Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error running rails server - Symbol not found - therubyracer

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.

like image 871
Cleyton Avatar asked Mar 04 '16 15:03

Cleyton


1 Answers

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!!

like image 84
Anand Soni Avatar answered Oct 19 '22 06:10

Anand Soni