I have a Rails application that needs to run a node script. I imagine that using the ExecJS gem is the cleanest way to run JavaScript from a Rails app. However, so far, Exec
I'm not sure of the answer but maybe you need to precise the exec_js_runtime environment variable to be node.
Something like ENV['EXECJS_RUNTIME'] = 'Node'
You can try to put it in the config/boot.rb or just to define the EXECJS_RUNTIME in your environment, something like export EXECJS_RUNTIME=Node
Hope it helps