当我想要将我的应用部署到heroku (使用git push heroku master)时,它给我一个错误,并告诉我安装sqlite3 -v '1.3.6‘。所以在成功安装了这个gem之后,我再次尝试将它部署到heroku上,它仍然给我同样的错误!!但是,我已经安装了它。现在我甚至不能在本地运行我的rails项目(rails服务器)。我可以知道这可能是什么原因吗?
以下是我在database.yml文件中的内容:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000发布于 2012-07-18 00:35:48
Heroku不适用于SQLite3
打开Gemfile并替换该行:
gem 'sqlite3'为
group :production do
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
end我还建议你阅读heroku的说明:https://devcenter.heroku.com/articles/rails3
发布于 2012-07-18 00:35:43
让你的gemfile看起来像这样
group :production do
gem 'pg'
end
group :development, :test do
gem 'sqlite3-ruby', :require => 'sqlite3'
endhttps://stackoverflow.com/questions/11526603
复制相似问题