Politics, Programming and Possibilities
30 Apr
I have a shared account on a server where Ruby 1.8.5 is installed but Merb is not. To install gems, I added “$HOME/lib/ruby/gems/1.8/bin” to my path, and the following 3 lines to my .profile:
export GEM_HOME=$HOME/lib/ruby/gems/1.8
export RUBYLIB=$HOME/lib/ruby:$HOME/lib/site_ruby/1.8
export RB_USER_INSTALL=true
I had to add the last line because hpricot is a compiled extension that uses the “install” command to put it in the correct directory once it’s done. Tip came from this site. Without RB_USER_INSTALL set to true, I received the following error:
/usr/bin/install -c -o root -g wheel -m 0755 hpricot_scan.so
install: /…/hpricot_scan.so: chown/chgrp:
Operation not permitted *** Error code 71
Next, I installed rubygems:
wget http://rubyforge.org/frs/download.php/20989/\
rubygems-0.9.4.tgz
tar xzvf rubygems-0.9.4.tgz
cd rubygems-0.9.4
ruby setup.rb all –prefix=$HOME –siterubyver=$HOME\
/lib/site_ruby/1.8
And last but not least:
gem install -y merb
Thanks to Ian Mckellar for starting me off.
Update: For the record, the following gems were needed for my project:
Leave a reply