When I had to set up a new Windows PC with Rails, I ran in to a mysterious error where I couldn’t view my app because of purported problems with my .coffee.js files. However, I knew there was no issue with the files since they were created during scaffolding and had only comments in them. Furthermore, I was able to run the same code on my other PC fine, as is.
When I viewed the –trace there was nothing of note (except listing that the coffee files had issues with them). When I tried to load the view, I did see this though “ExecJS::RuntimeError in Home#index”
Fortunately, I found the solution in this thread which explains that this is the result of Node.js not on a PC, or the path not set correctly in Windows environment variables. I downloaded the Windows installer (.msi) file and installed Node.js and added the path to the PATH environment variable. After I restarted my Rails server, the error went away.