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
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 :)
7 Comments
code Message from application: Could not find a JavaScript runtime. See github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)Explore related questions
See similar questions with these tags.