Rails 3.1 Sqlite3 Error On Push To Heroku

本秂侑毒 提交于 2019-12-10 17:28:44

问题


I have a rails 3.1 app that i am trying to push to Heroku. It keeps failing when i push it.

Installing sqlite3 (1.3.4) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!
       /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
       /usr/local/bin/ruby extconf.rb
       checking for sqlite3.h... no
       sqlite3.h is missing. Try 'port install sqlite3 +universal'
       or 'yum install sqlite3-devel' and check your shared library search path (the
       location where your sqlite3 shared library is located).

I changed my gem file to have the following lines:

gem 'sqlite3', :group => [:development, :test]
gem 'pg', :group => [:production]

Even after running bundle install etc i am getting the error. I even ran some tests without sqlite3 in my gem file and it still tries to install it on Heroku. Any suggestions?


回答1:


Lol it turns out i was working on one branch and was pushing my master. Once i merged them and pushed the correct branch everything worked great.




回答2:


The Cedar stack doesn't yet support bundle without according to the docs, http://devcenter.heroku.com/articles/bundler so it will still attempt to install it on deployment.

To be honest, you'd be much better using postgres locally if that is what you're deploying too.



来源:https://stackoverflow.com/questions/7868686/rails-3-1-sqlite3-error-on-push-to-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!