I’ve Got Your Rails Right Here
RHEL5, RVM, Rails 3
I’ve tried to avoid dealing with RVM, but there’s really no other viable solution to get Ruby onto a production system. Hell, even the developer-hell that is Ubuntu can’t keep pace with Ruby. The good news is that RVM does actually make things easier. Take the installation of RVM, Ruby 1.9.2, and Rails 3…
As root:
yum --exclude=*.i?86 install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl
As your Ruby-happy user:
echo insecure >> ~/.curlrc bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile source .bash_profile rvm install 1.9.2 rvm use 1.9.2 rvm use 1.9.2 --default rvm gemset create rails3 rvm gemset use rails3 gem install rails
Note: Curl on RHEL5 is braindead when it comes to SSL – thus, you need to basically force Curl to not authenticate certificates by way of the insecure method.
Can it be that simple?
# ruby --version ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] # rails --version Rails 3.1.3
I’m not going to stop cringing at the idea of taking software version control out of the hands of your distribution’s package management system. It’s the wrong thing to do. It’s always the wrong thing to do, even when it’s the right thing to do (hi, content management systems living in a docroot).
Still, props to RVM. It’s been blissfully easy to work with, and at least has clear upgrade paths/capabilities, even if they do reside outside of the rest of the system.