Rails ExecJS::ProgramError in Pages#home? Rails ExecJS::ProgramError in Pages#home? windows windows

Rails ExecJS::ProgramError in Pages#home?


In your /app/views/layouts/application.html.erb lines 5 and 6, change the first parameter from application to default.

I met the same problem, toofor my situation, I don't know why, but it only happens on Windows.The parameter application works on the web server.


If you are running in WIndows, the coffee-script-source 1.9.0 does not work on windows.

Change it to a previous version adding this line to your Gemfile:

gem 'coffee-script-source', '1.8.0'

And then reinstall the bundle adjusting the dependencies for the new Gem version with:

bundle update coffee-script-source


I've been having this issue for a while and having gone through all the answers in this thread and found them all to be unsuccessful, I've decided to add my solution in hopes that it helps future Rails users.

I've done everything in this thread - changing application to default allows it to go through without an error, but then once you actually try to use any JavaScript, an error is displayed regarding not being able to find default.js. I've installed NodeJS and put it in my Ruby/bin folder. That did nothing, so I removed it.

You can indeed temporarily get around this problem with the "switching out application with default" solution, but it's extremely short term. This solution may work for you if you have no intention of styling or adding JavaScript to your app through the Rails asset pipeline. I have not tested this myself, but I imagine including JavaScript and stylesheets in the application.html header file may work. But then you lose the magic of Rails.

I have had this issue on Windows 8, Windows 10, and Ubuntu platforms.

The only thing that solves it, for me, and still renders the JavaScript and stylesheets is to first change application to application.css for the stylesheets (even if you're using Sass/SCSS, because it still compiles down into css) and application.js for the JavaScript link. Once that is done, go into your /assets/javascripts/application.js file and delete the // in front of //= require turbolinks.

And now your application should work just fine.

This is probably a deeper issue with turbolinks, but this is a quick workaround that hasn't let me down yet.