Fix therubyracer/libv8 (0.12.1) installation on Mavericks

前端 未结 7 544
情书的邮戳
情书的邮戳 2021-02-05 05:17

OK, I’m at the end of my tether with this. There are a few similar questions but they all refer to therubyracer 0.10, and they mostly conclude that the problem can be fixed by u

相关标签:
7条回答
  • 2021-02-05 05:28

    I had this same problem when I upgraded from OSX Mountain Lion to OSX Mavericks. The patch level of ruby 1.8.7 apparently matters.

    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)
  • 2021-02-05 05:31

    This issue no longer exists in the latest version of therubyracer (0.12.3).

    bundle update therubyracer
    
    0 讨论(0)
  • 2021-02-05 05:35

    I was able to get things going again by running gem install libv8 -v '3.16.14.3' -- --with-system-v8.

    Reference: https://github.com/cowboyd/libv8/issues/120

    0 讨论(0)
  • 2021-02-05 05:39

    It could be that rubygems is fetching the wrong binaries for your system.

    Diagnosis:

    • Compare the output of gem env platform to 'Kernel Version' under  > About This Mac > System Report > Software
    • If those don't match (e.g. Kernel Version: 14.4.0 and x86_64-darwin-12) then RubyGems is grabbing the wrong version of therubyracer and libv8 for your system

    Fix:

    • short-term: bundle update therubyracer --platform=x86_64-darwin-14
    0 讨论(0)
  • 2021-02-05 05:45

    OK, so this is now sorted.

    For future people with the same problem, I was suffering from having ruby built against a previous installation of OS X.

    Fixed by completely nuking rvm and starting from scratch, though I imagine you could just uninstall/reinstall the offending ruby.

    More details on how the problem was solved here:

    https://github.com/cowboyd/libv8/issues/120

    0 讨论(0)
  • 2021-02-05 05:54

    I was able to proceed with ruby racer after rm Gemfile.lock Perhaps try this, which is easier than the RVM nuke option.

    beforehand: I installed v8 via brew install v8, and then did gem install libv8 -v '3.16.14.3' -- --with-system-v8

    and I am running 10.10 Yosemite

    0 讨论(0)
提交回复
热议问题