-
-
Save imaz/e8d7f7672d55ae02b2d3 to your computer and use it in GitHub Desktop.
Mountain Lion にしてから bundle install とか gem install とか rvm 周りでエラーが出る件
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/work/test]$ bundle install | |
Fetching gem metadata from http://rubygems.org/...... | |
Fetching gem metadata from http://rubygems.org/.. | |
Using rake (0.9.2.2) | |
Using i18n (0.6.1) | |
: | |
(中略) | |
: | |
Installing hpricot (0.8.6) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/imaz/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb | |
checking for stdio.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 | |
--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/imaz/.rvm/rubies/ruby-1.9.3-p194/bin/ruby | |
/Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError) | |
You have to install development tools first. | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:930:in `have_header' | |
from extconf.rb:2:in `<main>' | |
Gem files will remain installed in /Users/imaz/.rvm/gems/ruby-1.9.3-p194/gems/hpricot-0.8.6 for inspection. | |
Results logged to /Users/imaz/.rvm/gems/ruby-1.9.3-p194/gems/hpricot-0.8.6/ext/fast_xs/gem_make.out | |
An error occurred while installing hpricot (0.8.6), and Bundler cannot continue. | |
Make sure that `gem install hpricot -v '0.8.6'` succeeds before bundling. | |
[~/work/test]$ gem install hpricot -v '0.8.6' | |
Building native extensions. This could take a while... | |
ERROR: Error installing hpricot: | |
ERROR: Failed to build gem native extension. | |
/Users/imaz/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb | |
checking for stdio.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 | |
--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/imaz/.rvm/rubies/ruby-1.9.3-p194/bin/ruby | |
/Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError) | |
You have to install development tools first. | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for' | |
from /Users/imaz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:930:in `have_header' | |
from extconf.rb:2:in `<main>' | |
Gem files will remain installed in /Users/imaz/.rvm/gems/ruby-1.9.3-p194/gems/hpricot-0.8.6 for inspection. | |
Results logged to /Users/imaz/.rvm/gems/ruby-1.9.3-p194/gems/hpricot-0.8.6/ext/fast_xs/gem_make.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bundle install --binstubs
gem install hpricot -v '0.8.6'
⇒エラー! エラー! ここの内容。
https://developer.apple.com/downloads/index.actionダウンロード: Xcode 4.5.2
⇒まだ直らない
ダウンロード: Command Line Tools (OS X Mountain Lion) for Xcode - November 2012
⇒まだ直らない
$ xcodebuild -version
xcrun: Error: failed to exec real xcrun. (No such file or directory)
⇒ほむ?
http://stackoverflow.com/questions/11977648/xcrun-error-failed-to-exec-real-xcrun-no-such-file-or-directory
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
⇒あっ! これ最近見たやつだ!
$ xcodebuild -version
Xcode 4.5.2
Build version 4G2008a
⇒おお!