Installing libv8 gem on OS X 10.9+

后端 未结 20 916
旧时难觅i
旧时难觅i 2020-11-29 14:41

I\'m trying to install libv8 3.16.14.3 but getting an error on OSX Mavericks using latest stable rvm and ruby-1.9.3-p125.

This is the output of running the command \

相关标签:
20条回答
  • 2020-11-29 15:21

    When I tried the accepted answer, libv8 would install successfully with gem install libv8, but bundle install would fail on libv8. I think that bundle install was trying to install a different version of libv8. I was able to find a solution that worked for me.

    I needed libv8 because therubyracer depends on it. To get it to install, I noted the version that was failing to install in the gem_make.out log for therubyracer. (The path for the gem_make.out log will be in the failure message.) In my case it was 3.16.14.7. (This version will probably change over time, in case you're reading this three years from now.) Then I did this:

    gem install libv8 -v 3.16.14.7 -- --with-v8-lib <-- note different flag from accepted answer

    which allowed this to work:

    gem install therubyracer

    which allowed me to complete my bundle install.

    This worked for me on OSX Yosemite.

    0 讨论(0)
  • 2020-11-29 15:24

    What really worked for me was upgrading ruby to 2.2.0, removing Gemfile.lock and bundling over again.

    Worked like a charm!

    0 讨论(0)
  • 2020-11-29 15:25

    You can actually install that version on Mavericks:

    gem install libv8 -v 3.11.8.17 -- --with-system-v8
    

    I can confirm this works with rbenv and ruby 1.9.3p448

    0 讨论(0)
  • 2020-11-29 15:25

    This worked fine for me:

    Try installing this pre-compiled gem:

    https://dl.dropboxusercontent.com/u/7919548/gems/libv8/libv8-3.11.8.17-x86_64-darwin-13.gem (sha1:5ce07aaf4085fff5a5e10fe018fd6b22021bef3b)

    Or if you prefer to build your own:

      git clone https://github.com/cowboyd/libv8.git
      cd libv8
      git checkout 3.11
      bundle install
      bundle exec rake clean build binary
      gem install pkg/libv8-3.11.8.17-x86_64-darwin-13.gem
    

    Source: https://github.com/cowboyd/libv8/issues/107

    Thanks to Felix Bünemann for the fix!

    0 讨论(0)
  • 2020-11-29 15:27

    I had this same problem when I upgraded from OSX Mountain Lion to OSX Mavericks. The accepted answer worked for libv8, but not when I went to bundle install therubyracer gem.

    Upgrading from ruby-1.8.7-p354 to ruby-1.8.7-375 did the trick for me. libv8 (3.16.14.3-x86_64-darwin-13) and the therubyracer (0.12.0) gems installed without problem.

    assuming you use rbenv:

    rbenv versions
      system
      * 1.8.7-p354
      2.0.0-rc2
    
    rbenv uninstall 1.8.7-p354
    rbenv install 1.8.7-p375
    
    rbenv versions
      system
      * 1.8.7-p375
      2.0.0-rc2
    
    bundle install
    
    0 讨论(0)
  • 2020-11-29 15:30

    https://github.com/cowboyd/therubyracer/issues/339

    jasonlynes's solution found on that link made the trick for me. anything else didn't work.

    brew install homebrew/versions/v8-315
    brew link --overwrite v8-315 --force
    gem install libv8 -v '3.16.14.13' -- --with-system-v8
    gem install therubyracer -v '0.12.2' -- --with-system-v8
    
    0 讨论(0)
提交回复
热议问题