sstephenson/execjs — Issue #59: ExecJS::RuntimeError: sh: nodejs: Permission denied
Author: eckz
Created: 2011-12-16 12:26:14+00:00
State: open

With an empty gem set (using rvm and ruby-1.9.3)

gem install execjs

Executing this code

```
require 'execjs'
ExecJS.eval "'red yellow blue'.split(' ')"
```

raises

```
ExecJS::RuntimeError: sh: nodejs: Permission denied

from /home/erick/.rvm/gems/ruby-1.9.3-p0@execjs/gems/execjs-1.2.12/lib/execjs/external_runtime.rb:149:in `exec_runtime'
from /home/erick/.rvm/gems/ruby-1.9.3-p0@execjs/gems/execjs-1.2.12/lib/execjs/external_runtime.rb:27:in `block in exec'
from /home/erick/.rvm/gems/ruby-1.9.3-p0@execjs/gems/execjs-1.2.12/lib/execjs/external_runtime.rb:40:in `compile_to_tempfile'
from /home/erick/.rvm/gems/ruby-1.9.3-p0@execjs/gems/execjs-1.2.12/lib/execjs/external_runtime.rb:26:in `exec'
from /home/erick/.rvm/gems/ruby-1.9.3-p0@execjs/gems/execjs-1.2.12/lib/execjs/external_runtime.rb:18:in `eval'
from /home/erick/.rvm/gems/ruby-1.9.3-p0@execjs/gems/execjs-1.2.12/lib/execjs/external_runtime.rb:107:in `eval'
from /home/erick/.rvm/gems/ruby-1.9.3-p0@execjs/gems/execjs-1.2.12/lib/execjs/module.rb:23:in `eval'
from (irb):2
from /home/erick/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `

'
```

Result of `gem list`

```
*** LOCAL GEMS ***

execjs (1.2.12)
multi_json (1.0.4)
```

node.js is in the PATH (/usr/local/bin/node), and works

node.js version is 0.6.6