Dipendra Singh Dipendra Singh - 1 month ago 14
Ruby Question

Rails server command generates error report

When I used

rails server
command, found following errors in terminal. It shows that "could not find a JavaScript runtime". I am newbie in ROR and don't know to configure different files. I Google and found solutions of this problem 1 2 3. Still I am not getting the things. Please suggest some solutions.

enter image description here

Ruby and Rail versions on my system

Ruby version:- ruby 1.8.7 , Rails version:- Rails 3.2.6

Answer

I suppose you lack executable on your system/

Haven't you try to run gem install execjs or bundle install(from your project directory) in console?

UPDATE

Also visit execjs homepage and try instaling any of JS runtimes supported.

UPDATE 2

I was able to reproduce your error (with ruby 1.9.2). Just add gem 'therubyracer' to your Gemfile and run bundle install. For some weird reason ROR is not working out of the box on Ubuntu. See this and search for runtime word for more info.

PS

Please put your Gemfile here. This might help.

Comments