第一的,
gem 'libv8', '~> 3.11.8'===libv8 (~> 3.11.8.12)
gem 'execjs'==========execjs (>= 0.3.0)
gem 'therubyracer'====therubyracer (0.11.4)
存在于 Gemfile
Gemfile.lock show (libv8 (~> 3.11.8.12),execjs (>= 0.3.0),therubyracer (0.11.4))
centos5.7已经有nodejs Myproject我使用rake时没有问题但是crontab是错误的。
我运行的 .sh 类型文件
#!/bin/bash
export PATH=$PATH:/usr/local/bin
cd /abc && bundle exec rake RAILS_ENV=production sync:abc
错误
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'