uninitialized constant V8::JSError on starting ruby server on ubuntu 14.04

574 views Asked by At

I'm a complete noob in ruby, so please pardon my mistakes.

I'm installing Apphera (a social networking crawler) on Ubuntu 14.04, and I'm getting this error when I'm trying to start the ruby server

ankit@APPSERVER:/home/deployer/apphera$ rails s
/usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:61:in `rescue in lock': uninitialized constant V8::JSError (NameError)
    from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:60:in `lock'
    from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:19:in `initialize'
    from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:15:in `new'
    from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:15:in `instance'
    from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/loader.rb:10:in `initialize'
    from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:14:in `new'
    from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:14:in `<module:Less>'
    from /usr/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:9:in `<top (required)>'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:76:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:72:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:72:in `block in require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:61:in `each'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler/runtime.rb:61:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.7.9/lib/bundler.rb:134:in `require'
    from /home/deployer/apphera/config/application.rb:16:in `<top (required)>'
    from /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.7/lib/rails/commands.rb:53:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.7/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.7/lib/rails/commands.rb:50:in `tap'
    from /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.7/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

I understand that this issue that got something to do with the JS environment on the system and I tried installing nodes, but the error was same. I tried almost every solution mentioned on SO, but nothing worked for me.

Here are some specific details about my installation:

  • Ruby : 1.9.1
  • gem - v : 2.4.5
  • gem list | grep libv8 --> libv8 3.16.14.7
  • gem list | grep therubyracer --> therubyracer 0.12.1

I tried installing therubyracer/libv8 both manually and with with bundle install, but it didn't work. I even made changes to my gemfile/Gemfile.lock, but,again, nothing worked.

0

There are 0 answers