Skip to content

Instantly share code, notes, and snippets.

@dennis-8
Created July 26, 2018 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennis-8/23ca5d036ae7e305a1c1467bc717b62f to your computer and use it in GitHub Desktop.
Save dennis-8/23ca5d036ae7e305a1c1467bc717b62f to your computer and use it in GitHub Desktop.
Change ExecJS runtime in RoR
How to change ExecJS runtime in RoR
@dennis-8
Copy link
Author

dennis-8 commented Jul 26, 2018

In config/boot.rb

To print out the current runtime, after importing ExecJS via require 'execjs'
just run: puts ExecJS.runtime.name

And to set the current runtime, just use ExecJS.runtime = ExecJS::Runtimes::Node

@dennis-8
Copy link
Author

require 'execjs'

ExecJS.runtime = ExecJS::Runtimes::Node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment