最初、
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'