I was going fine and then suddenly I can't start my dev server

I’m new so I just can’t figure out what’s going on here. I was going through a tutorial to learn the ins and outs of Rails and then it just stopped working.

Here are the errors.

[rake --tasks] rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/execjs-1.2.11/lib/execjs/runtimes.rb:47:in autodetect' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/execjs-1.2.11/lib/execjs.rb:5:in <module:ExecJS>’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/execjs-1.2.11/lib/execjs.rb:4:in <top (required)>' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in require’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in <top (required)>' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in require’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in <top (required)>' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/coffee-rails-3.1.1/lib/coffee-rails.rb:1:in require’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/coffee-rails-3.1.1/lib/coffee-rails.rb:1:in <top (required)>' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in require’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in block (2 levels) in require' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in each’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in block in require' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in each’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in require' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler.rb:122:in require’
W:/RubymineProjects/blog/config/application.rb:7:in <top (required)>' W:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' W:/RubymineProjects/blog/Rakefile:5:in <top (required)>’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- load' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- load_rakefile’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- raw_load_rakefile' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- block in load_rakefile’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- standard_exception_handling' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- load_rakefile’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- block in run' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- standard_exception_handling’
W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- run' W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake- <top (required)>’
W:/RailsInstaller/Ruby1.9.2/bin/rake:19:in load' W:/RailsInstaller/Ruby1.9.2/bin/rake:19:in <main>’

I tried “gem install execjs”. No change. I tried reinstalling Ruby, then Rails. No change. What could I have possibly done? Is it really as fragile as it seems or did I just make a terrible mistake?

Man, Rails is freakin’ frustrating!!! :mad:

I gave up last night and went to sleep. After this morning’s boot it seems to work. :?

I thought Windows had the market on random issues. :stuck_out_tongue: :lol:

I know how frustration can mount when you are trying to get something done and the software seems to fight with you. I am trying to teach myself to take a Zen approach; relax and carefully examine the problem. The page full of information is a bit overwhelming.
But if you take a moment and read the error message, it appears there is a Javascript file missing. The one referenced at line 47 of W:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/execjs-1.2.11/lib/execjs/runtimes.rb

Ruby is not to blame
Rails is not to blame
Apparently, the execjs is the sourcr of the problem.

I’m not so much into the Zen approach, I’d rather give it a virtual pistol-whipping and see if it complies. :wink:

That’s what I was thinking as well but the Javascript file was there, it just refused to find it. :shrug:

It’s working as it should after a reboot though. I just wish that I could explain why it happened so I can prevent it in the future.

Thank you for the reply. :slight_smile:

I should add that this isn’t my only frustration with Rails so far. I’m just used to the ease of ASP.NET MVC and Visual Studio and having things pretty much handed to you. Basically, I’m out of shape. :wink:

You need a JS runtime for your system. I’m not sure why it would work after a reboot, but, the fix is to install one of the runtimes listed at: [URL=“https://github.com/sstephenson/execjs”]https://github.com/sstephenson/execjs

gem install therubyracer

That’s just it. It is there. It’s always been there. It just decided to not work for some reason. :nono:

I did try that about 300 times but …

gem install therubyracer fails. Every time. Even after the reboot. I don’t care because it’s working. Thanks for the assistance.

I wish there were some consistency. The random and intermittent stuff is frustrating.

Rails on Windows has some issues. If you have a way to work on some type of *nix system it makes life a whole lot easier.

I think you’ve nailed the issue at hand. Unfortunately my Mac is broken and I’ve not got enough room on my hard drives in the windows machine to install *NIX.

Thanks for the help. :slight_smile: Much appreciated.