rails tutorialの第1章、herokuにデプロイするところでaplication.errorが出てしまうのでこれを解決したいです。
heroku logsで調べたところ以下のエラー表記が出ました。
at=error code=H10 desc="App crashed" method=GET path="/" host=sleepy-cove-81212.herokuapp.com request_id=e09be085-ca1e-44bc-b919-b104d254b4a9 fwd="103.5.142.233" dyno= connect= service= status=503 bytes= protocol=https 2018-09-12T04:23:34.456315+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sleepy-cove-81212.herokuapp.com request_id=6e670cfe-948e-4934-a1ef-8b86185d51b9 fwd="103.5.142.233" dyno= connect= service= status=503 bytes= protocol=https
検索して調べる中でわかった、heroku run rails c も試したところ以下が表示されました。
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/connection_specification.rb:188:in `rescue in spec': Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
gemがロードされてない、gemfileにsqlite3を加えてくださいと書いてあってので、gemfileを覗きました。
source 'https://rubygems.org' gem 'rails', '5.1.6' gem 'puma', '3.9.1' gem 'sass-rails', '5.0.6' gem 'uglifier', '3.2.0' gem 'coffee-rails', '4.2.2' gem 'jquery-rails', '4.3.1' gem 'turbolinks', '5.0.1' gem 'jbuilder', '2.7.0' group :development, :test do gem 'sqlite3', '1.3.13' gem 'byebug', '9.0.6', platform: :mri end group :development do gem 'web-console', '3.5.1' gem 'listen', '3.1.5' gem 'spring', '2.0.2' gem 'spring-watcher-listen', '2.0.1' end group :production do gem 'pg', '0.20.0' end # Windows環境ではtzinfo-dataというgemを含める必要があります gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
tutorialの説明書の中で移動するように表記のあったgroup:development, :test doのところにありました。
現在、移動する場所が間違っていたのか、もしくわ、gemのインストールで何か間違えがあるのかと自分では考えておりますが、
もしわかる方が、いらっしゃいましたら教えてくださると嬉しいです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/09/12 07:12
2018/09/12 07:31
退会済みユーザー
2018/09/12 08:35
2018/09/12 08:38
退会済みユーザー
2018/09/12 08:42
2018/09/12 08:46
退会済みユーザー
2018/09/12 09:15