ruby on rails のフレームワークを使ってherokuでデプロイしようとしています。
mimemagicのGPL混入問題は
rails のバージョンupとmimemagicのgem追加で対応しました。
するとgit push heroku master でのFailed to install gems via Bundler.
は消えてgit push heroku master成功しました。
しかし、その後heroku open でデプロイできたはずのサイトに飛ぶとApplication errorが出てしまいました。
そこで、heroku run rails cでlogを確認したところ下記のエラーが出ます。
sqlite3' ActiveRecordアダプターのロード中にエラーが発生しましたと出ます
原因がわかりません。
ご教授のほどよろしくお願いします。
- ruby 2.5.1
- rails 5.2.5
/app/vendor/bundle/ruby/2.5.0/gems/bundler-2.2.16/lib/bundler/rubygems_integration.rb:334:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? sqlite3 is not part of the bundle. Add it to your Gemfile. (LoadError)
gemfile
1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.5.1' 5 6# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 7# gem 'rails', '~> 5.2.3' 8gem 'rails', '~> 5.2.5' 9# Use sqlite3 as the database for Active Record 10# gem 'sqlite3' 11# Use Puma as the app server 12gem 'puma', '~> 3.11' 13# gem 'puma' 14# Use SCSS for stylesheets 15gem 'sass-rails', '~> 5.0' 16# gem 'sass-rails' 17# Use Uglifier as compressor for JavaScript assets 18gem 'uglifier', '>= 1.3.0' 19# gem 'uglifier' 20# See https://github.com/rails/execjs#readme for more supported runtimes 21# gem 'mini_racer', platforms: :ruby 22 23# Use CoffeeScript for .coffee assets and views 24gem 'coffee-rails', '~> 4.2' 25# gem 'coffee-rails' 26# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 27gem 'turbolinks', '~> 5' 28# gem 'turbolinks' 29 30# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 31gem 'jbuilder', '~> 2.5' 32# gem 'jbuilder' 33# Use Redis adapter to run Action Cable in production 34# gem 'redis', '~> 4.0' 35# Use ActiveModel has_secure_password 36# gem 'bcrypt', '~> 3.1.7' 37 38# Use ActiveStorage variant 39# gem 'mini_magick', '~> 4.8' 40 41# Use Capistrano for deployment 42# gem 'capistrano-rails', group: :development 43 44# Reduces boot times through caching; required in config/boot.rb 45gem 'bootsnap', '>= 1.1.0', require: false 46# gem 'bootsnap', require: false 47 48group :development, :test do 49 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 50 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 51end 52 53group :development do 54 # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 55 gem 'web-console', '>= 3.3.0' 56 # gem 'web-console' 57 gem 'listen', '>= 3.0.5', '< 3.2' 58 # gem 'listen' 59 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 60 gem 'spring' 61 gem 'spring-watcher-listen', '~> 2.0.0' 62 # gem 'spring-watcher-listen' 63end 64 65group :test do 66 # Adds support for Capybara system testing and selenium driver 67 gem 'capybara', '>= 2.15' 68 # gem 'capybara' 69 gem 'selenium-webdriver' 70 # Easy installation and use of chromedriver to run system tests with Chrome 71 gem 'chromedriver-helper' 72end 73 74# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 75gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 76 77 78gem 'font-awesome-sass' 79 80#デプロイ用 81gem 'sqlite3', group: [:development, :test] 82 83gem "mimemagic", "~> 0.3.10"
あなたの回答
tips
プレビュー