雖然嘗試部署一類項目的Heroku發生錯誤,我收到以下錯誤:Heroku的 - 而安裝的sqlite3(1.3.7)
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也很新。任何幫助/想法將不勝感激。謝謝!
提示:當你解決這個問題,你也許會得到與資產管道預編譯的東西下一個錯誤。對於固定的是,簡單的添加寶石「rails_12factor」,組:生產到您的Gemfile。 – Mattherick