therubyracer - Gem::Ext::BuildError: ERROR: Failed to build gem native extension

前端 未结 14 1760
抹茶落季
抹茶落季 2020-12-07 11:09

I\'m trying to install the following gem versions on Mavericks

  • libv8 (3.16.14.3)
  • therubyracer (0.12.1)

Obviously therubyracer gems depe

相关标签:
14条回答
  • 2020-12-07 11:37

    This has worked for me:

    gem install libv8 -v '3.16.14.17' -- --with-system-v8
    brew install v8-315
    gem install therubyracer -v '0.12.3' --source 'http://rubygems.org/' -- --with-v8-dir='/usr/local/opt/v8@3.15'
    

    For the last command check the output of brew --prefix v8-315 in my case it was /usr/local/opt/v8@3.15.

    0 讨论(0)
  • 2020-12-07 11:39

    Tertom's solution posted on github solved it for me, after having tried all other solutions proposed on the respective github issue and here.
    I had the exact same system configuration.
    This is on el capitan, so not an exact answer to the question, but people might find this info helpful.

    I'm citing it here for visibility:

    Solved the same problem

    • MacOS 10.11.2
    • ruby 1.9.3
    • libv8 3.16.14.13
    • therubyracer 0.12.2

    --

    brew tap homebrew/versions  
    brew install v8-315  
    brew link --force v8-315  
    bundle install  
    brew unlink v8-315
    

    If you also cannot install libv8,

    gem install libv8 --with-system-v8
    

    or

    bundle config build.libv8 --with-system-v8
    
    0 讨论(0)
提交回复
热议问题