2

I'm trying to install Twitter-Bootstrap-Rails gem on Mac OSX Lion. I added the twitter-bootsrap line to my Gemfile, but when I run bundle install, it's failing due to an issue with therubyracer gem.

....rvm/rubies/ruby-1.9.2-p318/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.

I already have developer tools running, and XCode 4.3.2. I'm running Rails 3.2 and Ruby 1.9.2p318.

Any idea why the compiler might be failing for this gem install or how I can fix?

william tell
  • 4,352
  • 6
  • 23
  • 27
  • Probably this [answer][1] will work for you [1]: http://stackoverflow.com/questions/9421410/telling-bundler-to-exclude-certain-gems-from-a-particular-gems-installation/9422630#9422630 – rogeliog May 17 '12 at 23:10
  • Do you have the Xcode command line tools installed? That error message usually includes a reference to a log file that would probably be useful. – Andrew Marshall May 18 '12 at 01:25
  • @Andrew Marshall I do have Xcode command line tools installed - I even re-installed but no luck. – william tell May 18 '12 at 22:31
  • Is there any way to tell which compiler it may be using? GCC or LLVM etc? from your stack trace? http://wellconsidered.be/post/18996655760/therubyracer-compile-error-osx-10-7-lion – Kashyap Jul 17 '12 at 06:03
  • http://stackoverflow.com/questions/8032824/cant-install-ruby-under-lion-with-rvm-gcc-issues – Kashyap Jul 17 '12 at 06:04

1 Answers1

-2
gem install therubyracer

or

gem 'therubyracer'

works for me on linux.

Peter DeWeese
  • 18,141
  • 8
  • 79
  • 101
Ryan Wong
  • 120
  • 1
  • 7