今、herokuを用いてRailsで作成したアプリケーションをデプロイしようとしています。(今回が初めてのデプロイではなく、かれこれ1年以上運用しています)
今日、少しのCSSの変更を含んだものをマージしデプロイしたところ、Application error
となりページが開けなくなりました。
herokuのログに出ているものとしては、can't find gem bundler (>= 0) (Gem::GemNotFoundException)
が怪しく、おそらくここで落ちています。
環境としては以下のようになっています
Ruby 2.6.3 Rails 6.0.0 Bundler 2.0.2
いくつかのサイトでこちらのエラーを検索したところ、Bundler2系で不具合が見つかっており、Ruby2.6系じゃないと動かないといった記事を見つけましたが、もともとRuby2.6.3なので問題なさそうです。
また、bundlerのバージョンとGemfile.lock
のBUNDLED WITH
が違ってもエラーが起きるという記事も見つけましたが、こちらも共に2.0.2
なので問題がなさそうです。
上記のようなことをしたのですが一向に解決せず、大変困っております。もし解決法をご存知の方がいらっしゃいましたら教えていただきたいです。
追記
Gemfile
rb
1source 'https://rubygems.org' 2 3ruby '2.6.3' 4 5git_source(:github) do |repo_name| 6 repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") 7 "https://github.com/#{repo_name}.git" 8end 9 10# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 11 12gem 'rails', '6.0.0' 13gem 'bcrypt' 14# Use Puma as the app server 15gem 'puma', '~> 4.2' 16# Use SCSS for stylesheets 17gem 'sass-rails', '~> 6.0' 18# Use Uglifier as compressor for JavaScript assets 19gem 'uglifier', '>= 1.3.0' 20# See https://github.com/rails/execjs#readme for more supported runtimes 21# gem 'therubyracer', platforms: :ruby 22# Use CoffeeScript for .coffee assets and views 23gem 'coffee-rails', '~> 5.0' 24gem 'jquery-rails' 25# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 26gem 'turbolinks', '~> 5' 27# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 28gem 'jbuilder', '~> 2.5' 29gem 'rails-i18n' 30gem 'seed-fu' 31gem 'sidekiq' 32 33gem 'slack-notifier' 34 35gem 'omniauth' 36gem 'omniauth-twitter' 37gem 'omniauth-facebook' 38 39gem 'carrierwave' 40gem 'rmagick' 41 42gem 'slim-rails' 43 44gem 'dotenv-rails', require: 'dotenv/rails-now' 45 46gem 'geocoder' 47gem 'gmaps4rails' 48 49gem 'rack-rewrite' 50 51gem 'counter_culture' 52 53# Use Redis adapter to run Action Cable in production 54# gem 'redis', '~> 4.0' 55# Use ActiveModel has_secure_password 56# gem 'bcrypt', '~> 3.1.7' 57 58# Use Capistrano for deployment 59# gem 'capistrano-rails', group: :development 60 61group :development, :test do 62 # Use sqlite3 as the database for Active Record 63 gem 'sqlite3' 64 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 65 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 66 # Adds support for Capybara system testing and selenium driver 67 gem 'capybara', '~> 3.29' 68 gem 'launchy' 69 gem 'selenium-webdriver' 70 gem 'rails-erd' 71 gem 'pry-rails' 72 gem 'pry-byebug' 73 gem 'pry-doc' 74 gem 'hirb' 75 gem 'hirb-unicode' 76 77 gem 'rspec-rails' 78 gem 'factory_bot_rails' 79 gem 'rails-controller-testing' 80 gem 'spring-commands-rspec' 81 gem 'rspec_junit_formatter' 82 gem 'shoulda-matchers' 83 gem 'database_cleaner' 84 85 gem 'rack-mini-profiler', require: false 86 gem 'bullet' 87end 88 89group :development do 90 # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. 91 gem 'web-console', '>= 3.3.0' 92 gem 'listen', '>= 3.0.5', '< 3.3' 93 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 94 gem 'spring' 95 gem 'spring-watcher-listen', '~> 2.0.0' 96end 97 98group :test do 99 gem 'minitest-reporters', '1.4.2' 100 gem 'guard', '2.16.1' 101 gem 'guard-minitest', '2.4.6' 102end 103 104group :production do 105 gem 'pg', '1.1.4' 106 gem 'fog', '2.2.0' 107end 108 109# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 110gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
heroku logs
rb
12019-11-05T06:42:55.332884+00:00 heroku[web.1]: Restarting 22019-11-05T06:42:55.543395+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb` 32019-11-05T06:42:55.665995+00:00 app[web.1]: /usr/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException) 42019-11-05T06:42:55.666069+00:00 app[web.1]: from /app/bin/bundle:3:in `<main>' 52019-11-05T06:42:55.734193+00:00 heroku[web.1]: Process exited with status 1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/11/05 07:47
退会済みユーザー
2019/11/05 07:55 編集
退会済みユーザー
2019/11/05 08:35
退会済みユーザー
2019/11/05 08:37
退会済みユーザー
2019/11/05 09:02 編集
退会済みユーザー
2019/11/05 09:04
退会済みユーザー
2019/11/05 09:17 編集
退会済みユーザー
2019/11/05 09:17
退会済みユーザー
2019/11/05 09:19
退会済みユーザー
2019/11/05 09:24
退会済みユーザー
2019/11/05 09:36
退会済みユーザー
2019/11/05 10:00
退会済みユーザー
2019/11/05 10:08
退会済みユーザー
2019/11/05 12:19
退会済みユーザー
2019/11/05 21:57 編集
退会済みユーザー
2019/11/08 13:05