Rails 4.0.1 可用并尝试更新到该版本(当前为 4.0 版)
我正在运行bundle update
,它开始正常工作,但随后出现一个似乎与 Unicorn 有关的错误,所以整个事情都被中止了。错误如下:
Installing unicorn (4.7.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/myname/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb
checking for SIZEOF_OFF_T in ruby.h... *** 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=/Users/myname/.rbenv/versions/2.0.0-p247/bin/ruby
/Users/myname/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.
知道如何解决这个问题吗?
宝石文件
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
gem 'pg'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jquery-turbolinks'
gem 'jquery-ui-rails'
gem 'jbuilder', '~> 1.2'
group :doc do
gem 'sdoc', require: false
end
gem 'bcrypt-ruby', '~> 3.0.1'
gem "figaro"
gem 'unicorn'
group :production do
gem 'rails_12factor'
end
gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby'
gem 'memcachier'
gem 'dalli'
gem 'devise'