読者です 読者をやめる 読者になる 読者になる

manatee-itの備忘ログ

プログラム初心者のブログ。ruby on railsでWebサービスを作成中。(仕事が忙しくなかななか進まず) つまずいた所をなんでも記録。 環境:Ruby2.1 + Rails4.1.1 + Passenger + CentOS6.4(Apache + sqlite/MySQL)

「Could not find a JavaScript runtime」のエラー、therubyracerをコメントアウトして対応

# rails g scaffold programs name:string
/usr/local/lib/ruby/gems/2.1.0/gems/execjs-2.1.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /usr/local/lib/ruby/gems/2.1.0/gems/execjs-2.1.0/lib/execjs.rb:5:in `'
from /usr/local/lib/ruby/gems/2.1.0/gems/execjs-2.1.0/lib/execjs.rb:4:in `'
from /usr/local/lib/ruby/gems/2.1.0/gems/uglifier-2.5.0/lib/uglifier.rb:3:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/uglifier-2.5.0/lib/uglifier.rb:3:in `'
from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
from /var/www/html/Tabetai/config/application.rb:7:in `'
from /usr/local/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/application.rb:82:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/application.rb:82:in `preload'
from /usr/local/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/application.rb:140:in `serve'
from /usr/local/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/application.rb:128:in `block in run'
from /usr/local/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/application.rb:122:in `loop'
from /usr/local/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/application.rb:122:in `run'
from /usr/local/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in `'
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `

'

therubyracerをコメントアウトして対応
# vim Gemfile
gem 'therubyracer', platforms: :ruby