I'm trying to bundle install an application and it keeps getting stuck at the curb gem. Here is the Gemfile:
source :rubygems
gem 'sinatra', '~>1.0'
gem 'yajl-ruby', '~>0.7.8'
gem 'mustache', '~>0.11.2'
gem 'curb', '~>0.7.8'
gem 'coderay', '~>0.8.357'
gem 'sinatra_auth_github'
group :test do
gem 'shotgun'
end
And here is the error:
steven-gallaghers-macbook-pro:hurl sgallagher$ bundle install
Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://rubygems.org/..
Using addressable (2.2.2)
Using coderay (0.8.357)
Installing curb (0.7.8) 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!
/Users/sgallagher/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/sgallagher/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
"$(cflags) -fno-common -pipe"
checking for curl-config... yes
checking for curlinfo_redirect_time... *** 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
--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/sgallagher/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/lib
/Users/sgallagher/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/sgallagher/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:446:in `try_compile'
from extconf.rb:52:in `block in have_constant'
Any thoughts?
Since XCode4 doesn't use gcc-4.2 there are many libraries fail to be installed.
You have to install XCode3, from a developer centre, and it will create for you gcc-4.2.
How to do that:
Good luck