Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lowstz/1739538 to your computer and use it in GitHub Desktop.
Save lowstz/1739538 to your computer and use it in GitHub Desktop.
Installing Octopress [Fedora Version] (source for http://blog.aldwin.us/2011/08/18/installing-octopress/ )
layout title date comments categories
post
Installing Octopress (Fedora Version)
2012-02-05 06:13
true
fedora linux octopress ruby rvm jekyll rubygems

I (rather obviously) recently found myself attempting to install Octopress. Sure, it has great documentation, but some areas were lacking -- specifically, initial setup. As someone who has not worked with Ruby before other than a rather limited Windows install for a jekyll project, I had virtually no experience installing Ruby, using RVM, or even playing with RubyGems.

After a couple of hours of trial and error (and Google-searching), I managed to get Octopress running on my local machine. I then proceeded to duplicate my steps on my other dev machine; wonder of wonders, it became a simple five-minute process once I knew what to do.

As I stated earlier, the Octopress documentation doesn't cover everything, so I figured I'd go over my install process in more detail here to help you get started with Octopress and its underlying technologies.

Prerequisites

According to the RVM guide, you need a few prerequisites to install Ruby:

    sudo yum install curl wget git-core
    sudo yum install gcc zlib-devel make openssl autoconf automake

Feel free to disregard some of the packages in the second command if you know better; I haven't verified whether all of them are absolutely necessary.

Also, a quick disclaimer: I am by no means an expert in this. This is the tale of one man's successful fight to install Octopress, and as such, I cannot address all of the variants of installations. I'm not using Github Pages, so I won't specifically address that (the Octopress guide goes over Github Pages integration with much detail). My two installs both used Ubuntu-derived distributions, so I'm guessing these instructions will mostly work for Debian-based systems. No guarantees beyond that. I installed RVM for single-user use; system-wide installation instructions can be found in the RVM guide if you need them.

Installing RVM

RVM is the Ruby Version Manager. It handles the installation and management of multiple Ruby environments, and Octopress was created specifically to be installed into an RVM-controlled environment.

Start off with this command to install single-user RVM (for system-wide installation instructions, see the RVM guide):

    bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Once RVM is installed, tell bash to use it (you only need to do this once):

    echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
    source .bash_profile

To check that it is properly installed, run one (or both) of these commands:

    type rvm | head -1
    # expected: rvm is a function
    which rvm
    # expected: /home/[USERNAME]/.rvm/bin/rvm

Installing OpenSSL & iconv

Now that you've installed RVM, you should use it to install the OpenSSL & iconv packages. They are used within Octopress, so they must be installed and correctly integrated with Ruby.

Run these commands to install the two:

    rvm pkg install openssl
    rvm pkg install iconv

Installing Ruby

This step is the meat of the process. You must install version 1.9.2 of Ruby. It may take a while to download and install, but after it has finished, you will have a fresh copy of the newest Ruby release installed into RVM.

    rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr

Once Ruby is installed, ensure RVM has also installed the latest RubyGems:

    rvm rubygems latest

Finally, tell RVM to use 1.9.2 as the default Ruby and install the Bundler dependency manager:

    rvm use 1.9.2 --default
    rvm reload
    gem install bundler

Getting Started With Octopress

Now that you have the system all configured, you're almost all ready to begin the Octopress setup. Simply change directories to a suitable location for your site repository and then follow the instructions on the Octopress Setup Page. The Octopress docs should be able to answer pretty much any further questions you have about installing, configuring, or blogging with Octopress; they are quite extensive.

I hope this simple guide was helpful. If you have any questions or comments, let me know! Shoot me an email at lowstz@gmail.com or post in the comments below (assuming I've gotten Disqus to work). Thanks for stopping by.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment