execJs: 'Could not find a JavaScript runtime' but execjs AND therubyracer are in Gemfile
location: linuxexchange.com - date: May 27, 2015
I'm getting this error:
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs,
I have already spent more hours searching google then I am willing to admit. I believe this is an execJs bug.
From all the posts, this is a very common issue with rails 3.1. A js runtime is now needed by what are now standard gems like coffee-script and sass.
Most of these cases were resolved by adding the gems 'execjs' and 'therubyracer' to the app Gemfile, and then running 'bundle update' and/or 'bundle install'. But not for me.
I guess I got lucky. I am running rails 3.1.3/ruby 1.9 on an old version of Redhat Linux 4 (2.6.9-101.ELsmp) and gcc is 3.4.6.
Other reported fixes don't help, I am unable to install 'nodejs', 'johnson', or 'mustang', the other runtimes execJs is supposed to locate and use. They won't make/install on my system.
I need to fix the problem causing execJs to fail to locate 'therubyracer'. Here is the Gemfile (and bundle install
bundle install / update: libv8 (therubyracer) installation fails (with native extensions)
location: linuxexchange.com - date: November 21, 2011
I recently wanted to update my gem bundle but ran into installation problems with libv8 (requirement for therubyracer):
Installing libv8 (3.3.10.3) with native extensions /usr/local/rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed
to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/local/rvm/rubies/ruby-1.9.3-head/bin/ruby extconf.rb
Checking for Python...*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
I have found the issue report on therubyracer github site and it suggests to uninstall and reinstall libv8, but this does not work on my Ubuntu 11.04 machine. Any ideas - or am I stuck with the old version for a while?
the therubyracer gem keeps causing bundle install to fail on ubuntu 12.04
location: linuxexchange.com - date: December 18, 2012
I'm trying to use capistrano to deploy, and it fails because of a rubyracer gem issue.
I tried adding the following variants to gemfile and then deploying to a production server on ubuntu and nothing works:
1)
gem 'libv8', '3.11.8.3'
3)
gem 'therubyracer'
gem 'libv8', '3.3.10.4'
4)
gem 'libv8', '~> 3.11.8.3'
It all gives the same error:
An error occured while installing therubyracer (0.11.0), and Bundler cannot continue.
Make sure that gem install therubyracer -v '0.11.0' succeeds before bundling.
So I try this instead:
group :production do
gem 'therubyracer', '0.10.2', :platforms => :ruby
end
But that causes this error:
Bundler could not find compatible versions for gem "libv8":
In Gemfile:
therubyracer (= 0.10.2) ruby depends on
libv8 (~> 3.3.10) ruby
libv8 (3.11.8.3)
It seems I currently have two version of lib8 on server:
libv8 (3.11.8.4, 3.3.10.4 x86_64-linux)
Any ideas?
therubyracer or nodejs, which should I use?
location: linuxexchange.com - date: February 12, 2013
I am following the ruby on rails getting started guide on a new install of Ubuntu 12.10. I'm up to running rake db:create but I get the following error:
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
I've searched around and the suggested solutions (see list below) are to install some either therubyracer or nodejs but they don't explain why.
rake db:create - Could not find a JavaScript runtime
Rails 3.1 error - Could not find a JavaScript runtime?
http://datacodescotch.blogspot.com.au/2011/11/rails-31-spree-and-rake-aborted-could.html
http://www.blog.railshouse.com/
Before I go installing stuff I want to know what the differences are between these JavaScript runtimes and why I would choose one over the other?
Update:
I just read https://github.com/sstephenson/execjs (I know I should have read this first, sorry) and it seems to me that execjs is not a JavaScript runtime and I already have it... so i
Could not find a JavaScript runtime despite therubyracer and nodejs being installed
location: linuxexchange.com - date: December 27, 2012
I'm trying to run a Rails app on CentOS 5 and keep getting this error:
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
I have both NodeJS (v0.8.15) and therubyracer (libv8) installed.
Here is my gem list:
*** LOCAL GEMS ***
actionmailer (3.2.9, 3.2.8)
actionpack (3.2.9, 3.2.8)
activemodel (3.2.9, 3.2.8)
activerecord (3.2.9, 3.2.8)
activerecord-sqlserver-adapter (3.2.10)
activeresource (3.2.9, 3.2.8)
activesupport (3.2.9, 3.2.8)
arel (3.0.2)
builder (3.1.4, 3.0.4)
bundler (1.2.3, 1.2.2)
capistrano (2.13.5)
commonjs (0.2.6)
daemon_controller (1.1.0)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.4.0)
factory_girl (4.1.0)
factory_girl_rails (4.1.0)
fastthread (1.0.7)
haml (3.1.7)
haml-rails (0.3.5)
highline (1.6.15)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.1.4, 2.1.3)
json (1.7.5)
less (2.2.2)
less-rails (2.2.6)
libv8 (3.11.8.4)
mail (2.5.3, 2.4.4)
mime-types (1.19)
multi_jso
therubyracer (0.8.0) error on Ubuntu/Linux 11.10
location:
linuxexchange.com - date:
November 5, 2011
I am running the latest version of RVM on Ubuntu/Linux 11.10. I just tried installing a project in it's own gem set using rvm use
[email protected]_project --create. Then I ran gem install bundler;bundle install and got the following error.
I have had this error before, I have tried sudo apt-get install g++ build-essential but had no luck. I also tried installing libv8-3.1.8.22 libv8-dbg libv8-dev and still had no luck. Could this be related to Ubuntu 11.10? Does anyone have any suggestions?
The error: https://gist.github.com/1340929 (was too long to post)
I can't install therubyracer in Arch Linux x64
location: linuxexchange.com - date: May 11, 2014
When I try to install therubyracer, I get the following error:
Installing therubyracer (0.11.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/carlos/.rbenv/versions/1.9.3-p327/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for v8.h... yes
creating Makefile
make
compiling script.cc
compiling v8.cc
compiling backref.cc
compiling value.cc
compiling accessor.cc
compiling trycatch.cc
compiling primitive.cc
compiling external.cc
compiling date.cc
compiling exception.cc
compiling init.cc
compiling template.cc
compiling message.cc
compiling stack.cc
compiling gc.cc
compiling string.cc
compiling handles.cc
compiling function.cc
compiling heap.cc
compiling invocation.cc
compiling locker.cc
compiling object.cc
compiling array.cc
compiling constants.cc
compiling rr.cc
compiling signature.cc
compiling constraints.cc
compiling context.cc
context.cc: In static member function ‘static VALUE rr::Contex
please wait...