# yum install ruby -> ruby, rubygems がインストールされる
$ gem install rails
$ rails new foo
$ cd foo
ま,ここまでは普通.
[error 1]
・症状
$ rails server
/home/hanayuki/.gem/ruby/1.9.1/gems/execjs-1.4.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 /home/hanayuki/.gem/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs.rb:5:in `
...(以下略)
・対処法
Gemfileに下記を追加
gem 'therubyracer'
$ bundle update
参考:http://d.hatena.ne.jp/kano4/20110708/javascript_runtime_error
[error2]
・症状
$ rails server
/home/hanayuki/.gem/ruby/1.9.1/gems/railties-3.2.5/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `active_record' for #
from /home/hanayuki/herokucamp/rails_project/foo/config/application.rb:54:in `
from /home/hanayuki/herokucamp/rails_project/foo/config/application.rb:13:in `
from /home/hanayuki/herokucamp/rails_project/foo/config/application.rb:12:in `
...(以下略)
・対処法
Gemfileに以下を追加
gem 'bigdecimal'
$ bundle update
これでやっと,rails server が動くようになります.
0 件のコメント:
コメントを投稿