Octopress

A blogging framework for hackers.

Installing Ruby With Rbenv

Rbenv handles the installation and management of multiple Ruby environments. Ruby 1.9.3 is required for Octopress and using rbenv you can install it with ease.

Standard Rbenv Installation

The standard method for installing rbenv uses Git. From your terminal, run the following commands:

cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
source ~/.bash_profile

Zsh users: In the instructions above substitute ~/.bash_profile with ~/.zshenv.

Note: You may need to add source ~/.bash_profile to ~/.profile depending upon your bash configuration.

Alternate Installation Using Homebrew

If you use Homebrew on Mac OS X you may prefer to install rbenv like this:

brew update
brew install rbenv
brew install ruby-build

Install Ruby 1.9.3

Next install Ruby 1.9.3 and you'll be all set.

rbenv install 1.9.3-p0
rbenv local 1.9.3-p0
rbenv rehash

Note: rbenv local 1.9.3-p0 ensures that your Octopress installation is using Ruby 1.9.3-p0 without modifying your environment in any other directory. If you wish to use 1.9.3-p0 everywhere, run rbenv global 1.9.3-p0 instead.

Run ruby --version to be sure you're using Ruby 1.9.3. If you're having trouble, seek help here

← Return to setup