“gem install therubyracer -v '0.10.2'” on osx mavericks not installing

后端 未结 12 1832
说谎
说谎 2020-11-28 17:22

Trying to install therubyracer on mavericks using \"gem install therubyracer -v \'0.10.2\'\" but i am getting the following error:

/Users/dennischen/.rvm/rub         


        
12条回答
  •  感情败类
    2020-11-28 18:15

    So I finally got it working after some struggling... thanks to Simon and Alvaro.

    I have one thing to add though, using the flag --with-system-v8 did not work for me... So i removed my system v8 with

    brew uninstall v8

    And the run

    gem install libv8

    If you have already run gem install libv8 with the system v8 flag be sure to uninstall that gem version (do it by running gem uninstall libv8). The important thing is that you shouldn't use the one provided by brew, it does not seem to work in Mavericks (it gets installed well and bundler will report that your bundle is complete, but your app will fail when it tries to use v8).

    To summarize the answer, doing the following worked for me:

    brew install apple-gcc42
    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 /usr/bin/gcc
    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 /usr/bin/g++
    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 /usr/bin/cpp
    
    brew uninstall v8
    gem install libv8
    gem install therubyracer
    

提交回复
热议问题