Linux Deploy Rails3 with Ruby1.9.2(2)
This is the situation on Ubunt11.04, everything works fine.
>bundle show execjs
/home/carl/.rvm/gems/ruby-1.9.2-p290/gems/execjs-1.2.4
>bundle show libv8
/home/carl/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.3.10.2-x86_64-linux
>bundle show therubyracer
/home/carl/.rvm/gems/ruby-1.9.2-p290/gems/therubyracer-0.9.3
But the grails envirement on redhat is a mess, the differences is the rvm.
I install ruby and others on ubunt with rvm. But I complied and installed ruby on redhat.
1. Install rvm on redhat
>mkdir -p ~/.rvm/src/
>cd ~/.rvm/src
>rm -fr rvm/
>git clone git://github.com/wayneeseguin/rvm.git
>cd rvm
>./install
The location is in /usr/local/rvm/bin
>vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/rvm/bin
[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # Load RVM function
>rm -fr /home/carl/.rvm/
>sudo ln -s /usr/local/rvm ~/.rvm
>source ~/.bash_profile
>rvm -v
rvm 1.7.2 by Wayne E. Seguin (
[email protected]) [https://rvm.beginrescueend.com/]
2. Install ruby
>sudo rvm install 1.9.2
error messages:
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
solutions:
back the crt if exist:
>sudo cp /etc/pki/tls/certs/ca-bundle.crt /root/backup/
generate the key
>wget http://curl.haxx.se/ca/cacert.pem
>sudo mkdir -p /etc/pki/tls/certs
>sudo cp cacert.pem /etc/pki/tls/certs/curl-ca-bundle.crt
>sudo cp cacert.pem /home/carl/.rvm/bin/curl-ca-bundle.crt
>sudo cp cacert.pem /usr/local/rvm/bin/curl-ca-bundle.crt
>sudo rvm install 1.9.2 --with-ca-bundle=/etc/pki/tls/certs/curl-ca-bundle.crt
Fails, it is not working.
3. check the information on redhat
>bundle show execjs
/home/carl/work/project/1.x/console/execjs/ruby/1.9.1/gems/execjs-1.2.4
>bundle show libv8
/home/carl/work/project/1.x/console/execjs/ruby/1.9.1/gems/libv8-3.3.10.2-x86-linux
>bundle show therubyracer
/home/carl/work/project/1.x/console/execjs/ruby/1.9.1/gems/therubyracer-0.9.3
It is really strange that the ubunt says the gem path, but the redhat says the project path.
strange, I try to copy them there.
>sudo cp -fr /home/carl/work/manhattan/1.x/console/execjs/ruby/1.9.1/gems/execjs-1.2.4 /usr/local/ruby1.9.2/lib/ruby/gems/1.9.1/gems/execjs-1.2.4
>sudo cp -fr /home/carl/work/manhattan/1.x/console/execjs/ruby/1.9.1/gems/libv8-3.3.10.2-x86-linux /usr/local/ruby1.9.2/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.2-x86-linux
>sudo cp -fr /home/carl/work/manhattan/1.x/console/execjs/ruby/1.9.1/gems/therubyracer-0.9.3/ /usr/local/ruby1.9.2/lib/ruby/gems/1.9.1/gems/therubyracer-0.9.3
It is not working. I was blocked here.
references:
http://sillycat.iteye.com/blog/1153950
http://curl.haxx.se/docs/sslcerts.html