当我这样做的时候
git push heroku master我得到以下消息:
An error occurred while installing sqlite3-ruby (1.2.5), and Bundler cannot continue.
Make sure that `gem install sqlite3-ruby -v '1.2.5'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app我已经安装了libsqlite3-dev,libsqlite3-0,sqlite3,当我运行:
gem install sqlite3-ruby -v '1.2.5'如错误消息中所示,它已成功安装:
Successfully installed sqlite3-ruby-1.2.5
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.5...
Installing RDoc documentation for sqlite3-ruby-1.2.5...我不确定问题出在哪里。
我的Gemfile是:
source 'http://rubygems.org'
gem 'rails', '3.0.1'
gem 'sqlite3-ruby', '1.2.5',:require => 'sqlite3'我可以知道问题是什么吗?我可以如何解决它?
发布于 2012-07-30 11:54:21
Heroku不支持sqlite3。
因此,您需要将Gemfile更改为:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end并再次运行bundle install
发布于 2012-07-30 09:12:57
我很确定你必须在heroku中使用Postgres数据库
发布于 2012-07-30 09:57:11
你不能在Heroku上使用SQLite。根据本文,您将需要使用postgres:https://devcenter.heroku.com/articles/database
我还建议在本地安装postgres以便测试和使用;如果您使用的是OS,请使用Homebrew安装它,否则请尝试postgres官方站点上的二进制文件之一。
https://stackoverflow.com/questions/11714336
复制相似问题