wil*_*ell 2 sqlite ruby-on-rails heroku ruby-on-rails-3
我尝试对heroku进行git推送时遇到错误(git push heroku master).我在雪松堆栈上,我的Gemfile指定sqlite 1.3.5.这是错误:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--enable-local
--disable-local
Gem files will remain installed in /tmp/build_3umr292rjcdek/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5 for inspection.
Results logged to /tmp/build_3umr292rjcdek/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5/ext/sqlite3/gem_make.out
An error occured while installing sqlite3 (1.3.5), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)
!!无法通过Bundler安装gem.!!Heroku推送拒绝,无法编译Ruby/rails应用程序
Heroku告诉你,你无法sqlite3-ruby
在Heroku平台上编译gem.
您可能希望将sqlite3-ruby
gem 移动到Heroku上默认未安装的组中.
gem "rails"
group :development, :test do
gem "sqlite3-ruby", :require => "sqlite3"
end
group :production do
gem "pg"
end
Run Code Online (Sandbox Code Playgroud)
更新:看起来宝石sqlite3-ruby
已经老了,而且sqlite3
你应该使用新宝石.
引起数小时头痛的一个问题是"水龙头"宝石.在我将其移入"开发"组之前,它几乎导致了完全相同的错误:
group :production do
gem 'taps'
gem 'pg'
end
Run Code Online (Sandbox Code Playgroud)
不确定这是否直接适用于你,但它产生了sqlite3错误,直到我把点击进入:生产.希望它会帮助某人.
编辑:@cloneofsnake:我没有足够的代表评论你的答案,但我看到你的Gemfile中有'taps'宝石.要么摆脱它,要么把它放在:生产组; taps显然对sqlite3有一些依赖.我已经为pg切换了sqlite3,但是我得到了与你相同的错误,直到我将'taps'移到了生产中.
归档时间: |
|
查看次数: |
3330 次 |
最近记录: |