在尝试将类项目部署到 heroku 时,我收到以下错误:
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
Failed to install gems via Bundler.
Detected sqlite3 gem which is not supported on Heroku.
https://devcenter.heroku.com/articles/sqlite3
Push rejected, failed to compile Ruby/Rails app
在做了一些调查之后,我发现sqlite3
它不能在 Heroku 上运行,我需要改为设置postresql
,并在我的 Gemfile 中指定开发/部署,如下所示:
gem 'rails', '3.2.13'
group :production, :staging do
gem "pg"
end
group :development, :test do
gem "sqlite3-ruby", :require => "sqlite3"
end
但是,我仍然遇到同样的错误。我正在为一个学校项目做这个,所以这是我在 Heroku 的第一次尝试,我对 Ruby on Rails 也很陌生。任何帮助/想法将不胜感激。谢谢!