Start using Ruby RVM on RHEL 6

Rubyists know RVM very well, I tried it several times. This time I am doing on RHEL 6. The installation instructions from the RVM site differs slightly when applied on a RHEL box, so here is my tutorial. I extended the process a bit with some tunings. As you will see I will create a dedicated user (running it on a server box) and configure everything slightly. Let's go.

yum -y install zlib-devel readline-devel libxml2-devel libxslt-devel sqlite sqlite-devel openssl-devel postgresql-devel
adduser -m ruby
passwd ruby
su ruby
echo "install: --no-rdoc --no-ri" > ~/.gemrc
curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash
. ~/.bashrc
rvm install 1.8.7
rvm use 1.8.7 --default
gem install bundler


After RVM installation and Ruby 1.8.7 setup, let's install a Ruby on Rails application (simple photo gallery) as an example.

git clone https://github.com/espen/balder.git
cd balder
bundle install
gem install pg
yum -y install perl-Image-ExifTool
rails server


Done. And what was the trick on RHEL? To install those devel packages and then the pipe into bash. The command from RVM site did not work as there is different Bash version than on Ubuntu, which the author apparently tested against.
12 November 2011 | ruby | fedora | rhel
twitter.com linkedin.com
google.com/+ facebook.com
flickr.com youtube.com