Lazy symbol binding failed Ruby Racer
Asked Answered
Q

3

10

I'm running El Capitan (Fresh install) and a Rails 4.2.1 app with Ruby 2.2.2. I've ran into issues initially with installing libv8 and had to force an install with brew install v8 and gem install libv8 (version) with systemv8 as a flag. Bundle works fine and installs all the gem dependencies.

But when I go to load rails s or bundle exec thin start to launch my app server I get the following error.

dyld: lazy symbol binding failed: Symbol not found: __ZN2v82V821AddGCPrologueCallbackEPFvNS_6GCTypeENS_15GCCallbackFlagsEES1_
  Referenced from: /Users/shakycode/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/therubyracer-0.12.2/v8/init.bundle
  Expected in: flat namespace

dyld: Symbol not found: __ZN2v82V821AddGCPrologueCallbackEPFvNS_6GCTypeENS_15GCCallbackFlagsEES1_
  Referenced from: /Users/shakycode/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/therubyracer-0.12.2/v8/init.bundle
  Expected in: flat namespace

I'm googling and searching for answers but haven't come up with much that works so far. My other machine which was an upgrade to El Capitan works no problem, but this clean install is problematic with libv8/v8/therubyracer.

Any thoughts on how I can debug this one? I want to code.

Quickstep answered 12/12, 2015 at 17:3 Comment(2)
Just ran into this issue as well. :/Landaulet
I got this too, ELCapiton -ruby 2.1.4p265Evan
E
2

I've just had this problem as well and I solved it by uninstalling and reinstalling therubyracer like so:

gem uninstall therubyracer
gem install therubyracer -v '0.12.2' -- --with-system-v8

For me it was triggered by an update to libv8 in the Gemfile. bundle install appeared to run without any problem after the update but I was seeing the same error as the OP whenever I tried to do anything on the command line.

Elum answered 1/2, 2016 at 15:43 Comment(1)
I should have posted the answer too. I had to rebuild libv8 with system-v8 before ruby racer would install.Quickstep
F
7

Just reinstalling therubyracer also did not work for me. Complete instructions:

gem uninstall therubyracer libv8
gem install libv8 therubyracer -- --with-system-v8
Factory answered 23/10, 2016 at 13:52 Comment(0)
E
2

I've just had this problem as well and I solved it by uninstalling and reinstalling therubyracer like so:

gem uninstall therubyracer
gem install therubyracer -v '0.12.2' -- --with-system-v8

For me it was triggered by an update to libv8 in the Gemfile. bundle install appeared to run without any problem after the update but I was seeing the same error as the OP whenever I tried to do anything on the command line.

Elum answered 1/2, 2016 at 15:43 Comment(1)
I should have posted the answer too. I had to rebuild libv8 with system-v8 before ruby racer would install.Quickstep
M
1

I faced similar error with mini_racer gem. I updated the version from 3.0.1 to 4.0.0 and it worked. Not getting any error now. Mostly it is the problem of version. Sometimes the version of the gem is not compatible with our OS version and this problem can occur. I was using macOS Sur. Many old versions of gems are not compatible with it.

Maltose answered 7/7, 2021 at 12:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.