这有点奇怪,但我刚刚更新了我的机器以使用 ruby 2.0 和 rails 4.0,但是当我尝试推送到 heroku 存储库时,我不断收到错误。我得到了一些东西
/tmp/build_1f394d14-4e73-419e-9e8f-3bb30d37dc63/vendor/ruby-2.0.0/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 ***
所以这里明显的问题是没有安装 sqlite3,这就是它失败的原因。我按照以下步骤安装 sqlite3
$: port install sqlite3 +universal
zsh: command not found: port
Duhhh ...它失败了,因为我的机器上没有macports
所以我做了
brew install sqlite3 +universal
为了验证 sqlite3 是否有效,我做了
sqlite3 -version
3.7.12 2012-04-03 19:43:07 86b8481be7e76cccc92d14ce762d21bfb69504af
现在安装了 sqlite3,我重新尝试了git push heroku master
,但仍然收到相同的错误消息。任何提示将不胜感激。
宝石文件
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.0'
gem 'sqlite3', '1.3.8'
group :development do
gem 'sqlite3', '1.3.8'
end
gem 'sass-rails', '4.0.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.0'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end