Error running rails server - Symbol not found - therubyracer
Asked Answered
K

2

8

I have this setup:

  • OSX El Capitan 10.11.1
  • Ruby 2.0.0p247 (Rbenv) (I don't have RVM)
  • Rails 4.1.14.1

I run bundle install and everything looks ok, but when I run rails server, it returns this message:

dyld: lazy symbol binding failed: Symbol not found: __ZN2v82V821AddGCPrologueCallbackEPFvNS_6GCTypeENS_15GCCallbackFlagsEES1_
  Referenced from: /Users/cleytonmessias/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.1/lib/v8/init.bundle
  Expected in: flat namespace

dyld: Symbol not found: __ZN2v82V821AddGCPrologueCallbackEPFvNS_6GCTypeENS_15GCCallbackFlagsEES1_
  Referenced from: /Users/cleytonmessias/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.1/lib/v8/init.bundle
  Expected in: flat namespace

Trace/BPT trap: 5

I've seen some people with this problem here but no solution until now.

Here's my Gemfile.

Kandace answered 4/3, 2016 at 15:12 Comment(2)
could you please add your gem file?Muskeg
@SsouLlesS I've edit and put itKandace
M
1

I am actually not Mac user but for curiosity I tried to find solution. I see that there is an incompatibility of software with particular OS X version. Most of the solution is shows to upgrade software. Out of many answers following seems correct to me :

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

In my Ubuntu system, I am using NodeJS as a javascript runtime. I suggest to use it if possible.

Hope that helps!!

Moriarty answered 7/3, 2016 at 19:3 Comment(4)
Can you explain more?Kandace
rather to use therubyracer, use NodeJS. it is workaround.Moriarty
Yes I always have nodeJS installed on mac then there is no need for therubyracer gemRosabella
Yes, @KimmoHintikka I also do the same.Moriarty
H
0

Mac OS Big Sur Issue solve for mini-racer gem: I faced similar error with mini_racer gem. I updated the version from 3.0.1 to 4.0.0 in my gemfile 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 Big Sur. Many old versions of gems are not compatible with it.

Howe answered 7/7, 2021 at 12:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.