Gem :: LoadError:为数据库适配器指定了"sqlite3",但未加载gem [英] Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded
问题描述
我正在尝试将我的应用程序推送到heroku,但收到此消息.
I'm trying to push my app to heroku but am getting this message.
Gem::LoadError: Specified 'sqlite3' for database adaptor, but the gem is not loaded.
但是我没有.我的database.yml文件中的任何地方都没有sqlite3
But I did not. I don't have sqlite3 anywhere in my database.yml file
development:
adapter: postgresql
encoding: unicode
database: blog_development
pool: 5
timeout: 5000
host: localhost
test:
adapter: postgresql
database: blog_test
pool: 5
timeout: 5000
production:
adapter: postgresql
database: blog_production
pool: 5
timeout: 5000
我的适配器名称是psotgresql.我什至自己打开了文件
My adapter name is psotgresql. I even opened the file myself
cat database.yml
我搜索了文件,但是找不到postgresql.这是我的宝石文件
I searched through the file but could not find postgresql. Here is my gemfile
ruby '2.1.0'
gem 'rails', '4.1.1'
group :development, :test do
gem 'pg', '0.17.1'
gem 'rspec-rails', '3.0.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
end
gem 'sass-rails', '~> 4.0.2'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'sprockets-rails', '~> 2.1.3'
gem 'bootstrap-sass', '3.1.1.1'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.1.1'
group :doc do
gem 'sdoc', require: false
end
gem 'bcrypt', '~> 3.1.7'
我在这里的生产环境中有pg.我已经多次运行捆绑包安装,捆绑包更新,git add,git commit和git push heroku master,但我仍然收到此消息.
I have pg located in the production environment here. I have ran bundle install, bundle update, git add, git commit, and git push heroku master numerous times and I still get this message.
我不明白这一点.我没有为数据库适配器指定sqlite3.
I don't understand this. I did NOT specify sqlite3 for my database adaptor.
我不知所措.
推荐答案
我必须将sqlite3版本指定为1.3.13:
I had to specify my sqlite3 version as 1.3.13:
gem 'sqlite3', '~> 1.3.13'
然后运行bundle update
.
这篇关于Gem :: LoadError:为数据库适配器指定了"sqlite3",但未加载gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!