Rails 4 sqlite3 Gem :: LoadError

时间:2013-07-22 06:44:01

标签: ruby-on-rails ruby ruby-on-rails-4

我一直在

Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile.

这是我的Gemfile:

source 'https://rubygems.org'
ruby '2.0.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
gem 'thin'
# gem 'sqlite3'
gem 'mongoid', git: 'https://github.com/mongoid/mongoid.git'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'

group :doc do
  gem 'sdoc', require: false
end

您还在哪里指定适配器?如您所见,sqlite3被排除在gemfile之外。服务器重启似乎不起作用。

1 个答案:

答案 0 :(得分:1)

请检查您的database.yml文件。您可能已将适配器指定为sqlite。