Mar 1, 2010

cpanel rubygems no such file to load gem A2hosting

Already make some script for a host with ruby, i 've got some trouble while deploy. I have no problem on my local but i got "no such file to load" however it already successfully installed.
Ensuring the installation,  i repeat my installation steps

gem install "module" -y

i move all cache file for gems to other path, you can also delete it.
mkdir mybackup
mv /home/your_username/ruby/gems/cache  mybackup

Cpanel said that i have to add this on my script, but it seems not solve the problem


so, i make change on .bashrc, i add some lines below
vim .bashrc
export PATH=.:$PATH:/home/your_username/ruby/gems/bin
export RUBYOPT=rubygems
export GEM_HOME=/home/your_username/ruby/gems
export GEM_PATH=/home/your_username/ruby/gems
export RUBYLIB=/home/your_username/ruby/gems/lib

logout to make bashrc be applied, then logged-in

check the script with irb
>require 'rubygems'
>require 'hoe'
Read more ...