Drop-Dead Simple Rbenv Install on Ubuntu 12.10

Posted by Rodney Oliver on August 7th at 5:34pm

For a while now I’ve wanted to give rbenv a whirl at managing my ruby installs.
I used rvm for a while and it was great, but I got tired of it messing around with my directories and paths. I’ve also been wanting to start a blog. I’ve heard lot of nice things about Octopress and thought I’d give it a try. Octopress uses ruby and sinatra so what better way to get started with rbenv than to use it install the latest ruby and install Octopress. The rest of the blog post focuses on installing rbenv. Installing Octopress is pretty simple as well head on over there and check out the docs.

Now installation of rbenv on a Mac is pretty simple. If you want to give it a try check out the installation docs on Sam Stephenson github account.
I develop on a mac and deploy to linux (ubuntu) servers. Since I’m lazy I first did a quick google and bam! I found this post by Parker J. Moore, also using Octopress BTW, that lays out the exact steps. I’m just parroting what he wrote:

sudo apt-get install zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev libruby1.9.1 libreadline-dev git-core make make-doc
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL # Restart the shell
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git
git clone git://github.com/sstephenson/rbenv-gem-rehash.git
rbenv install 1.9.3-p362
rbenv rehash
rbenv global 1.9.3-p362