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

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

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

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

Heroku

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

Ruby on Rails

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

Q&A

0回答

1285閲覧

heroku open でApplication errorが出る

MISIAN-MISIAN

総合スコア73

Ruby

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

Heroku

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

Ruby on Rails

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

0グッド

0クリップ

投稿2021/04/25 06:51

編集2022/01/12 10:55

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"

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

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

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

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

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

gouf

2021/04/25 10:00

Gemfile の内容は質問欄に追記できますか?
MISIAN-MISIAN

2021/04/25 10:19

gemfile 追加しました ご確認、ご指導のほどよろしくお願いします
MISIAN-MISIAN

2021/04/29 10:01

db使わない場合でも、database.yml の設定が必要なのでしょうか?
gouf

2021/04/29 10:14

エラーメッセージが DB 関連なので、それを解消する必要がありそうですね (「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)」) 「bundle update」を実行すると差分が発生すると思うのですが、それを Heroku に push した場合、何か変化は見られますか?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問