Rails 3.1 Sqlite3 推送到 Heroku 时出错
我有一个 Rails 3.1 应用程序,我正在尝试将其推送到 Heroku。当我推动它时它总是失败。
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).
我将 gem 文件更改为包含以下几行:
gem 'sqlite3', :group => [:development, :test]
gem 'pg', :group => [:production]
即使在运行捆绑安装等之后,我也会收到错误。我什至在 gem 文件中没有 sqlite3 的情况下运行了一些测试,但它仍然尝试在 Heroku 上安装它。有什么建议吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
哈哈,原来我正在一个分支上工作,并且正在推动我的主人。一旦我合并它们并推送正确的分支,一切就都很好。
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.
根据文档,Cedar 堆栈尚不支持
bundle without
,http:// /devcenter.heroku.com/articles/bundler 因此它仍会尝试在部署时安装它。老实说,如果您也正在部署 postgres,那么您在本地使用 postgres 会更好。
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.