Deploy Rails with Ruby1.9.2 on Redhat4(1)
1. Install gcc
check the version of gcc on my system.
>gcc -v
I already had it.
2. Install ruby
from the URL http://www.ruby-lang.org/en/downloads, I download the file ruby-1.9.2-p290.tar.gz
>tar zxvf ruby-1.9.2-p290.tar.gz
>cd ruby-1.9.2-p290/
>./configure --prefix=/usr/local/ruby1.9.2
>make
>sudo make install
error messages says : carl is not in the sudoers file. This incident will be reported.
solutions:
I need to make user carl sudoers.
>/usr/sbin/visudo -f /etc/sudoers
# User privilege specification
root ALL=(ALL) ALL
carl ALL=(ALL) ALL
>sudo make install
add the bin directory to PATH
>su root
>vi /etc/profile
PATH=$PATH:/sbin:/usr/sbin:/usr/local/ruby1.9.2/bin
export PATH
>. /etc/profile
>ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux][ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
###>source ~/.bash_profile
>curl -k https://rvm.beginrescueend.com/install/rvm -o rvm-installer
>chmod +x rvm-installer
>rvm_bin_path=~/.rvm/bin rvm_man_path=~/.rvm/share/man ./rvm-installer
It is not working for me to install rvm on redhat4.
>vi Gemfile
gem 'therubyracer', '>= 0.8.2'
gem 'therubyracer-heroku'
>bundle exec rake -T
>git clone https://github.com/fractaloop/libv8.git
messages:
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/fractaloop/libv8.git/info/refs
>env GIT_SSL_NO_VERIFY=true git clone https://github.com/fractaloop/libv8.git
>cd libv8
>env GIT_SSL_NO_VERIFY=true git submodule update --init
>bundle install
>bundle exec rake compile
Finally, I can not run >passenger start and >rails server on my virtualbox redhat4 machine. I will try the rails_mod next.
Other problems are solved, all of the 2 command report this kind of error message at the end.
[ pid=2900 thr=82891570 file=utils.rb:176 time=2011-08-21 11:57:44.100 ]: *** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)) (process 2900, thread #<Thread:0x9e1a664>):
references:
http://sillycat.iteye.com/blog/562613
http://sillycat.iteye.com/blog/562615
http://sillycat.iteye.com/blog/562617
http://sillycat.iteye.com/blog/562618
http://www.modrails.com/install.html
http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
http://www.freshblurbs.com/installing-ruby-rails-3-centos-nginx
http://hi.baidu.com/addcn/blog/item/eac5c094e5a22b43d0135e84.html
http://railsapps.github.com/installing-rails-3-1.html
http://wuhuizhong.iteye.com/blog/1106968
1. Install gcc
check the version of gcc on my system.
>gcc -v
I already had it.
2. Install ruby
from the URL http://www.ruby-lang.org/en/downloads, I download the file ruby-1.9.2-p290.tar.gz
>tar zxvf ruby-1.9.2-p290.tar.gz
>cd ruby-1.9.2-p290/
>./configure --prefix=/usr/local/ruby1.9.2
>make
>sudo make install
error messages says : carl is not in the sudoers file. This incident will be reported.
solutions:
I need to make user carl sudoers.
>/usr/sbin/visudo -f /etc/sudoers
# User privilege specification
root ALL=(ALL) ALL
carl ALL=(ALL) ALL
>sudo make install
add the bin directory to PATH
>su root
>vi /etc/profile
PATH=$PATH:/sbin:/usr/sbin:/usr/local/ruby1.9.2/bin
export PATH
>. /etc/profile
>ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux][ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
###>source ~/.bash_profile
>curl -k https://rvm.beginrescueend.com/install/rvm -o rvm-installer
>chmod +x rvm-installer
>rvm_bin_path=~/.rvm/bin rvm_man_path=~/.rvm/share/man ./rvm-installer
It is not working for me to install rvm on redhat4.
>vi Gemfile
gem 'therubyracer', '>= 0.8.2'
gem 'therubyracer-heroku'
>bundle exec rake -T
>git clone https://github.com/fractaloop/libv8.git
messages:
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/fractaloop/libv8.git/info/refs
>env GIT_SSL_NO_VERIFY=true git clone https://github.com/fractaloop/libv8.git
>cd libv8
>env GIT_SSL_NO_VERIFY=true git submodule update --init
>bundle install
>bundle exec rake compile
Finally, I can not run >passenger start and >rails server on my virtualbox redhat4 machine. I will try the rails_mod next.
Other problems are solved, all of the 2 command report this kind of error message at the end.
[ pid=2900 thr=82891570 file=utils.rb:176 time=2011-08-21 11:57:44.100 ]: *** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)) (process 2900, thread #<Thread:0x9e1a664>):
references:
http://sillycat.iteye.com/blog/562613
http://sillycat.iteye.com/blog/562615
http://sillycat.iteye.com/blog/562617
http://sillycat.iteye.com/blog/562618
http://www.modrails.com/install.html
http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
http://www.freshblurbs.com/installing-ruby-rails-3-centos-nginx
http://hi.baidu.com/addcn/blog/item/eac5c094e5a22b43d0135e84.html
http://railsapps.github.com/installing-rails-3-1.html
http://wuhuizhong.iteye.com/blog/1106968