Reputation: 13954
I upgraded to OS X Yosemite and gem install
stopped working.
When I run it, I see this big ugly error:
$ gem install rdiscount
Building native extensions. This could take a while...
ERROR: Error installing rdiscount:
ERROR: Failed to build gem native extension.
ruby -r ./siteconf.rb extconf.rb
checking for random()... *** 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=ruby
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/
mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from mkmf.rb:513:in `block in try_link0'
from tmpdir.rb:88:in `mktmpdir'
from mkmf.rb:510:in `try_link0'
from mkmf.rb:534:in `try_link'
from mkmf.rb:720:in `try_func'
from mkmf.rb:1004:in `block in have_func'
from mkmf.rb:895:in `block in checking_for'
from mkmf.rb:340:in `block (2 levels) in postpone'
from mkmf.rb:310:in `open'
from mkmf.rb:340:in `block in postpone'
from mkmf.rb:310:in `open'
from mkmf.rb:336:in `postpone'
from mkmf.rb:894:in `checking_for'
from mkmf.rb:1003:in `have_func'
from extconf.rb:5:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in rdiscount-2.1.7.1 for inspection.
Results logged to /gem_make.out
Upvotes: 1
Views: 605
Reputation: 13954
When you upgrade to Yosemite Xcode command line tools becomes unavailable.
Run this command, and follow the on screen instructions.
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
Upvotes: 1