Ruby on Railsで簡単なCMSを作成中に発生しました。
昨日まではrails sでちゃんと立ち上がっていたサーバーが以下のようなエラーを出すようになってしまいました…
Teratailの使用は初めてでつたない質問で申し訳ありませんが、皆様の知恵をお貸しいただけると幸いです。
###発生している問題・エラーメッセージ
$ rails s
=> Booting WEBrick
=> Rails 4.2.6 application starting in development on http://localhost:3000
=> Run rails server -h
for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:177: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)
from /Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
...
などと表示され、サーバーが立ち上がりません。
#該当するソースコード
なお、Gemfileは以下のようになっています。
source 'https://rubygems.org'
gem 'rails', '4.2.6'
...
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
###試したこと
bundle installすると
$ bundle install
...
Using sqlite3 1.3.11
...
Bundle complete! 25 Gemfile dependencies, 88 gems now installed.
Gems in the groups production, development and test were not installed.
Use bundle show [gemname]
to see where a bundled gem is installed.
と表示され、正常にインストールされているように見えます。
bundle updateなども試しましたがrails sは同じ結果でした..
###補足情報(言語/FW/ツール等のバージョンなど)
Macで使用
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin15]
Rails 4.2.6
sqlite3 3.8.10.2 2015-05-20 18:17:19
となっています。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。