Fixing ExecJS::ProgramError in page

How I got the issue

Created a new project in rails
$ rails new StaticPageDemo

Added static_page controller to it with home action
$ rails generate controller static_page home

Ran the server
$ rails server

Got this error while tried to access the page in http://localhost:3000/static_page/home

ExecJS programError

Solution

After some search in Google, I got a solution from this link, which helped me fixing the issue. I also learned, It is an issue with the windows. The application parameter works on the web server.

Opened the application.html.erb in app/views/layouts folder of StaticPageDemo project. Replaced application with default.

Categories: Ruby On Rails

Leave a Reply

%d bloggers like this: