2012/07/17

Rails3 on CentOS6.3

Installing  Rails3
Installing some pkg for Rails with yum and gem commands.
# yum -y install rubygem-rake ruby-devel make sqlite-devel gcc-c++
# gem install rails sqlite3 therubyracer

Creating Rails application
(adding your user-id into /etc/sudoers)
$ rails new ruby_app1
$ cd ruby_app1
$ rails server
/usr/lib/ruby/gems/1.8/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 /usr/lib/ruby/gems/1.8/gems/execjs-1.4.0/lib/execjs.rb:5
      from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffe_script.rb:1:in `require'

Updating 'Gemfile'
$ echo "gem 'therubyracer'" >> Gemfile

Restarting application server
$ rails server
you can see the local application on your browser 'http://localhost:3000'






have a fun!!

0 件のコメント: