我在 crontab 中执行 rake 报错了 therubyracer 和 execjs 两个包我都装了,nodejs 我也在系统中装好了,执行 node -v 能看到 nodejs 的版本,但是执行 crontab 的时候还是报错 Warning: NLS_LANG is not set. fallback to US7ASCII. rake aborted! Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. /opt/app/ruby/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in autodetect' /opt/app/ruby/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs.rb:5:inmodule:ExecJS' /opt/app/ruby/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs.rbin ' /opt/app/ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:240:inrequire' /opt/app/ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:240:in block in require' /opt/app/ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:223:inblock in load_dependency' 感谢热心人的帮助,但是问题仍然没有解决 gem 'libv8', '~> 3.11.8'===libv8 (~> 3.11.8.12) gem 'execjs'==========execjs (>= 0.3.0) gem 'therubyracer'====therubyracer (0.11.4) 三个包都已经安装了 Gemfile.lock 中 (libv8 (~> 3.11.8.12),execjs (>= 0.3.0),therubyracer (0.11.4)) 系统中也安装完了 nodejs 了,我想问一下,我的 nodejs 是后安装的,难道我需要先卸载 execjs,therubyracer 库,然后在重新安装一遍么
我发现好像是环境变量的问题,我的配置是 export PATH=$PATH:/opt/ruby/bin,我加了一个 export PATH=$PATH:/usr/local/bin,就好使了