Installing libv8 gem on OS X 10.9+

后端 未结 20 917
旧时难觅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:31

    You can configure bundler instead of having to know each version. @3.15 could be replaced with other versions.

    $ brew install v8@3.15
    $ bundle config build.libv8 --with-system-v8
    $ bundle config build.therubyracer --with-v8-dir=$(brew --prefix v8@3.15)
    $ bundle install
    
    0 讨论(0)
  • 2020-11-29 15:34

    I updated to macOS Catalina @ 10.15 and ruby 2.6.5. After a while got libv8 and therubyracer to install again, although I'd recommend not to update macOS yet (I heard ruby should be fine).

    First, I had to update XCode

    1. xcode-select --install

    I used rbenv to update ruby, and set the ruby version manually in /Users/<username>/.rbenv/version to 2.6.5. Although this shouldn't matter if your project contains a .ruby-version file.

    Then I cleaned up any version I installed fro libv8 (usually in /usr/local/opt/): brew uninstall v8, brew uninstall libv8@3.15

    1. brew install v8@3.15

    Now, following https://github.com/cowboyd/libv8#do-i-get-a-binary, I installed

    1. gem install libv8 -v '3.16.14.19' -- --with-system-v8

    and then could run bundle install without errors.

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