2

I have a RoR (4.1) app that I'm trying to run using Passenger & Nginx. I want to do the bundling on my CI server (jenkins), but when I copy the files across I get the dreaded:

Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

I have therubyracer in my Gemfile, and I can see it in my $GEM_HOME (./vendor/bundle/ruby/1.9.1/gems/). Obviously I can bundle install on the web server and fix the problem, but that's what I'm trying to avoid.

I've tried using "bundle pack --all", with no effect, but I'm currently using "bundle install --deployment" on the build server and then zipping up the whole folder and moving it to the web server. The build server is the same distro as the web server (Debian 7 x64).

Does anyone have any idea what I'm missing? Is it possible to get this working without running bundle install locally?

Bundler version 1.7.3

1 Answer 1

2

I had this problem and this is what I found:

You need a javascript runtime library such as nodejs to solve this problem.

For Ubuntu users , try the following command in the terminal:

sudo apt-get install nodejs

For installing nodejs on systems using yum, try the following in the terminal:

yum -y install nodejs

Hope it helps :)

Sign up to request clarification or add additional context in comments.

7 Comments

I installed libv8-dev (required by the libv8 gem, and hence therubyracer), but I still got the same error
I didn't get u. Do you mean you are not able to install nodejs in wheezy? I guess you can try this: antler.co.za/2014/04/… I tried nodejs on ubuntu and it works perfectly.
By the way, this question is similar to stackoverflow.com/questions/6282307/… . I guess you can get some insights from there.
I just meant that it's not as easy as on Ubuntu. There are a lot of similar questions, and I've tried many of the answers :)
I have installed nodejs but error is is the same. code Message from application: Could not find a JavaScript runtime. See github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.