Error when running "bundle install" on mac - therubyracer failing to install
Do this:
$ gem uninstall libv8 # ignore if this fails
$ gem install libv8 -v 3.16.14.3 -- --with-system-v8 # 2013-08 x86_64-darwin-12 (32.6 MB)
Also edit your Gemfile
and force a newer version of therubyracer
gem "therubyracer", "~> 0.12"
Then try again:
$ bundle update
The standard is that you not use system ruby and there are reasons why that is. Although you might be able to get this particular issue fixed remaining on the system ruby, using a ruby-manager like RVM or rbenv and along side with homebrew, you'll be able to quickly resolve any dependency issues.
It can kind of be a lengthy process because you'll first need to install Xcode and the additional command-line tools from Xcode. After that's done you'll need to get the ruby-manager.
I really like this shell script from thoughtbot and it uses rbenv - https://github.com/thoughtbot/laptop
Afterward run the thoughtbot script. It will take a while once you get it going. So go make some coffee. This will install homebrew, rbenv and setup everything.
After restarting terminal it should load your new bash_profile zsh. Run 'rbenv --help' to list the commands. For instance, you can use the command 'rbenv versions' to see what's available on the machine. Or to install 'rbenv install 2.0.0-p353' and then to set the ruby version globally you can use 'rbenv global 2.0.0-p353 or whatever current version you're using.
And you'll want to keep your patches up to date, some of which are security patches. Which is another reason for a manager. So you can easily update your systems to the latest and greatest! And as time goes on and your newer projects get newer versions, your older projects will require older versions. Not to confuse with patches, but for instance the move from ruby 1.9 to ruby 2.0. The change was significant enough, for some projects to not be practical to upgrade from ruby 1.9 with rails 3 to ruby 2.0 and rails 4. So when upgrading happens, I have to switch my version of ruby to run the application and make my changes. So just do it. Get away from the system ruby.
This worked for me in MAC
$ gem uninstall libv8
$ gem install therubyracer
Then try
bundle install
P.S. Posting answer so that it will help other in future.