How do I force execjs to use Node.js?
I figured out how to set the javascript runtime. In config/boot.rb I put the following line: ENV[‘EXECJS_RUNTIME’] = ‘Node’
I figured out how to set the javascript runtime. In config/boot.rb I put the following line: ENV[‘EXECJS_RUNTIME’] = ‘Node’
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, too for my situation, I don’t know why, but it only happens on Windows. The parameter application works on the web server.
Here I found help for the same problem you had. Run rails console and: JS_PATH = “app/assets/javascripts/**/*.js”; Dir[JS_PATH].each do |file_name| puts “\n#{file_name}” puts Uglifier.compile(File.read(file_name), harmony: true) end It will show you the file and the line where the Uglifier is making the problem.
Ubuntu Users: I had the same problem and I fixed it by installing nodejson my system independent of the gem. on ubuntu its: sudo apt-get install nodejs I’m using 64bit ubuntu 11.10 update: From @Galina ‘s answer below I’m guessing that the latest version of nodejs is required, so @steve98177 your best option on a … Read more
Ubuntu Users I’m on Ubuntu 11.04 and had similar issues. Installing Node.js fixed it. As of Ubuntu 13.04 x64 you only need to run: sudo apt-get install nodejs This will solve the problem. CentOS/RedHat Users sudo yum install nodejs