New install: Could not find a JavaScript runtime. (ExecJS::RuntimeUnavailable)

I've installed RubyMine for the first time.  I've created a new project of type "rails".  When running I got a series of missing gems, which I installed.  But now I have:

runtimes.rb:50:in `autodetect': Could not find a JavaScript runtime.
See for a list of available runtimes. (ExecJS::RuntimeUnavailable)

And I have no idea what to do next.  Various online searches listed various gems that must be missing, but none of them had an effect.  For example:

# sudo gem install "therubyracer"

Building native extensions.  This could take a while...

Successfully installed therubyracer-0.9.10

1 gem installed

Installing ri documentation for therubyracer-0.9.10...

Installing RDoc documentation for therubyracer-0.9.10...

I am running:
Linux Ubuntu 11.04 with Ruby 1.8.7

In the ide, showing the Gem for execjs shows:

execjs [execjs(1.3.0)]

Author(s): Sam Stephenson, Josh Peek
Gem      root: /var/lib/gems/1.8/gems   

I have done nothing to set EXECJS_RUNTIME

See also

Comment actions Permalink

Have you tried adding gem "therubyracer" to your Gemfile and running bundle install after that?

Comment actions Permalink

I'm not sure what a GemFile is, or how to run that command frmo within RubyMine.  I kinda expected RubyMine to handle this kind of detail!
How do I move forward?

Comment actions Permalink

Gemfile contains information about your application gem dependencies and is located in the root of your application. You can run bundle install via Tools | Bundler | Install


Please sign in to leave a comment.