質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Q&A

解決済

1回答

1634閲覧

railsアプリをHerokuでデプロイ時のエラー

_sora_

総合スコア14

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

0グッド

1クリップ

投稿2019/12/03 18:35

前提・実現したいこと

railsアプリをHerokuでデプロイ時(git push heroku master)した際に
以下のエラーメッセージが発生しました。

発生している問題・エラーメッセージ

remote: ! remote: ! Could not detect rake tasks remote: ! ensure you can run `$ bundle exec rake -P` against your app remote: ! and using the production group of your Gemfile. remote: ! Activating bundler (2.0.1) failed: remote: ! Could not find 'bundler' (2.0.1) required by your /tmp/build_a5a1935abed158bbe82fd9d1750698db/Gemfile.lock. remote: ! To update to the latest version installed on your system, run `bundle update --bundler`. remote: ! To install the missing version, run `gem install bundler:2.0.1` remote: ! Checked in 'GEM_PATH=vendor/bundle/ruby/2.5.0', execute `gem env` for more information remote: ! remote: ! To install the version of bundler this project requires, run `gem install bundler -v '2.0.1'` remote: !

エラーメッセージを見る限りではbundlerのバージョンを2.0.1にしてくれみたいなことが書かれていますが、

Gemfilelock

1BUNDLED WITH 2 2.0.1

なので混乱しています。

ただ1つgit push heroku master実行した際に

$ git push heroku master Enumerating objects: 198, done. Counting objects: 100% (198/198), done. Delta compression using up to 4 threads Compressing objects: 100% (169/169), done. Writing objects: 100% (198/198), 48.33 KiB | 1.24 MiB/s, done. Total 198 (delta 24), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. remote: Detected buildpacks: Ruby,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.5.1 remote: -----> Installing dependencies using bundler 2.0.2 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. remote: Fetching gem metadata from https://rubygems.org/............

Installing dependencies using bundler 2.0.2という記述が問題なのでしょうが
解決できません。

どなたかご教授の程よろしくお願いします。

試したこと

bundlerをアンインストール

補足情報(FW/ツールのバージョンなど)

ruby 2.5.1
rails 5.2.3

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

エラーメッセージで Google 検索すると、この問題に関する記事がいくつか見つかりますが、こちらは確認されていますでしょうか。

$ brew update && brew upgrade ruby-build $ rbenv install 2.6.3 $ rbenv local 2.6.3 $ gem install bundler -v 2.0.2 $ rm Gemfile.lock $ bundle install $ git add .ruby-version Gemfile Gemfile.lock $ git commit -m 'version up ruby' $ git push heroku master

[memo] Herokuで Could not find 'bundler' (2.0.1) と言われた
https://qiita.com/amuyikam/items/989300248f471020ca18

投稿2019/12/04 00:49

nskydiving

総合スコア6500

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

_sora_

2019/12/04 18:53

無事、bundlerを2.0.2に変更してデプロイすることができました。 自分の調べ不足がでした。 今後もう少し時間をかけて調べてどうしようもない時に質問するようにします。 nskydivingさんありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問