Lavixu
Lavixu

Reputation: 1398

Javascript runtime not included in default Gemfile

I am using rails 3.2.9 and ruby 1.9.3

When I do a

rails new blog

and try to generate a controller

rails g controller auth

it always throws an error :

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

and I always go back and edit the Gemfile with rubyracer gem( or one of the javascript runtimes available at here. Why is one of the javascript runtimes not included as a default gem in the Gemfile generated initially? Is there a specific reason to it?

Upvotes: 1

Views: 272

Answers (1)

Kindoloki
Kindoloki

Reputation: 614

You may have the js-runtime installed wide-system. For example, if you install node.js in linux, you will have js-runtime and there is no need to add anything to your Gemfile

Upvotes: 1

Related Questions