devinus / execjs

Run JavaScript code from Elixir
https://github.com/devinus/execjs
Creative Commons Zero v1.0 Universal
150 stars 22 forks source link

Whats the value to set environment variable EXECJS_RUNTIME? #5

Closed Padmahas closed 7 years ago

Padmahas commented 8 years ago

Hello Devin Torres, here you have said "EXECJS_RUNTIME environment variable can also be used to set the runtime". I used export EXECJS_RUNTIME="/opt/node-v4.4.5-linux-x64/bin" but when I run rails s, it shows Gem Load Error is: wrong constant name /opt/node-v4.4.5-linux-x64/bin.

So what must be the value of EXECJS_RUNTIME? Thank you.

devinus commented 8 years ago

@Padmahas are you looking for the Ruby execjs? https://github.com/rails/execjs

Padmahas commented 8 years ago

No, but I'm searching for its(ExecJS's) runtime. I would like to install softwares manually. So I installed .tar.xz version NodeJS in my Ubuntu system inside /opt/nodejs... but rails can't find it (may be its searching in default location. Installing the nodejs from package manager solves the prob. But I want to install manually. I downloaded from this link). So after some digging I came to know that setting EXECJS_RUNTIME environment variable is one of the best solution. While googling I came across your instructions to set env var. So what must be the value for that variable? As I mentioned in the previous comment is it the bin directory of NodeJS or what? What must be the value of EXECJS_RUNTIME?

devinus commented 8 years ago

@Padmahas Node, JavaScriptCore, SpiderMonkey or Rhino

devinus commented 8 years ago

Those values, the binary must be in the path.