I recently created a new project with Rails 4.2.0 and created a controller called Land
for the landing page. So, I ran into this error upon visting http:/
I recently found another solution for this problem. gem 'coffee-script-source'
in 1.9.0
has some issues with Rails on Windows
. I reverted to the previous version using gem 'coffee-script-source', '1.8.0'
in the Gemfile, this will resolve your problem.
Another way of solving this exception is installing Node.js onto your machine and the error should go away after installing & restarting rails server
. Make sure that you add Node.js into your PATH before restarting the terminal(s) and rerun the server.
Ahh, it seems that you are missing
//= require turbolinks
in your application.js
See this on removing turbolinks (and obviously make sure it's all in place if you want it running).
I am running Windows 10, Ruby 2.1.7p400 and Rails 4.2.4. I could not get gem coffee-script-source '1.8.0'
to install as gem insisted on version 1.9.1.1. I tried changing ExecJS to use UTF-8 encoding and running cscript without the //U switch as in this post without any luck as well.
I ended up placing nodejs.exe in the Ruby\bin folder and the issue was resolved.