In March this year I once again changed blog engines I was using. I switched to Jekyll after reviewing all the usual (and unusual) suspects. I describe most of my reasons1 in my post, Text File Revolution so I won’t rehash again, however, I did want to write a little tutorial on how to get Jekyll up and running on your Mac2.
The easiest way to get a hold of XCode is to download from the Mac App Store.
Git is not absolutely necessary, as RVM (the next pre-req) is available as a tarball, but Git is so popular these days I thought I would provide the instructions.
- Download Git. At the time that I wrote this I downloaded the package called, git-1.7.6-x86_64-snow-leopard.dmg, for my MacBook Air.
- Mount (double-click) the DMG file
- Double-click the PKG file to install
- After installation is complete open Terminal
- You need to execute the file, setup git PATH for non-terminal programs.sh, in the DMG file. I find it easiest to do this in Terminal:
cd G(then hit the tab key to autocomplete the volume)
- hit enter
./s(then hit the tab key to autocomplete the shell script file name)
- hit enter to run script
- Restart terminal and you now have Git installed
Pre-Requisite: Ruby Version Manager (RVM)
Again, RVM is not absolutely required but RVM does ensure that you do not jack up your system by overwriting the OS version of Ruby with a newer version. RVM allows multiple versions of Ruby to be installed on a system (in your home directory, .rvm) and makes it super simple to change the active version.
- Open Terminal and run the command below
bash < <( curl https://rvm.beginrescueend.com/releases/rvm-install-head )
- Note the message in the Terminal window after installation, it will be used below.
- Next use your favorite text editor and create a new text file that will be saved to your home directory as .profile. Below is what I did:
- Open TextMate
- Copied the text from the message in terminal message into TextMate:
[[ -s "/Users/bbohling/.rvm/scripts/rvm" ]] && source "/Users/bbohling/.rvm/scripts/rvm"
- Saved the doc in my home directory (/Users/bbohling/.profile)
- Now restart Terminal
rvm help. If installation was successful you will see help instructions.
Next we will install Ruby version 1.9.2. At this time Ruby version 1.8.7 comes with OS X (Lion). Since we installed RVM, this step is easy-peasy.
Lion users: You will need to open the .profile file and add the following line:
export CC=/usr/bin/gcc-4.2. This sets the default compiler to gcc.
- Open Terminal
rvm install 1.9.2
- Now that Ruby is installed you can type the following command to use the newer version of Ruby:
rvm use 1.9.2
- To verify type:
- To make 1.9.2 the default:
rvm --default 1.9.2
Finally the star attraction, Jekyll…which surprisingly is the easiest part. I also use the Jekyll plugin, jekyll-tagging, that provides a better solution (in my opinion) than the built-in categories feature.
gem install jekyll
gem install jekyll-tagging
Jekyll is now installed and you are capable of creating your own static, text-based website. I will try to write a follow-up post that describes how I have set up my templates and configuration. In the meantime, check out the docs.