How to install therubyracer gem on 10.10 Yosemite? How to install therubyracer gem on 10.10 Yosemite? ruby ruby

How to install therubyracer gem on 10.10 Yosemite?


gem uninstall libv8brew install v8gem install therubyracergem install libv8 -v '3.16.14.3' -- --with-system-v8

this is the only way it worked for me on 10.10 (ruby 2.1.2)

Or try gem install libv8 -v 'XX.XX.XX' -- --with-system-v8 adding the version of the gem :)

UPDATE for Mac OS Catalina:

brew tap homebrew/versionsbrew install v8@3.15brew link --force v8@3.15gem install libv8 -v 'XX.XX.XX' -- --with-system-v8gem install therubyracer


git clone https://github.com/cowboyd/libv8.gitcd libv8bundle installbundle exec rake clean build binarygem install pkg/libv8-3.16.14.3-x86_64-darwin-12.gem #note that libv8 version may change, so tab through files in pkg/, also remember to use the one with version specified

then just bundle your project gems

this is the only way it worked for me on 10.10 (ruby 2.1.2)


None of the answers work for me this time. I have too use this:

brew tap homebrew/versionsbrew install v8-315gem install libv8 -v '3.16.14.13' -- --with-system-v8gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315bundle install

Seen on the rubyracer Github issues.

Hope it helps someone else.