Working with octopress 2 and zsh

Posted by Orville Bennett on September 6, 2014
Read time: about 1 minute

I had to get a new mac recently in order to continue working on a client project since my older (2 year old) refurbished Macbook Pro had started acting up. Instead of continuing to fight with it I decided the wisest thing to do would be to get a new iMac. So now I have a fresh new mac with none of my settings and so i’ve started the long arduous task of copying over various settings. I do a lot of my work on the command line so this has involved some git cloning various things like my personal dotfiles repo and the git backups of all my websites.

My personal website, the very one you’re reading right now is powered by Octopress, so I had to go through some command line chicanery to get everything set up to my liking again. As you can tell from the timestamp on my last post. It’s been quite some time since I’ve octopressed. Imagine my surprise when I ran into some hurdles when trying to get everything built.

My first problem was that octopress has now move onto version 3. I installed the octopress 3 RC gem and was greeted with errors indicating This is not the octopress you are looking for. After downgrading I eventually bundle installed my way back to the previous state and tried to install the modified theme I had been using. Alas, I was greeted with this error message:

$ rake install['cleanpress']
rake aborted!
Don't know how to build task 'default'

Eventually I realized whaat was going on. My terminal is zsh and the way i have it set up, certain characters need to be escaped explicitly. Once I retyped that command and escaped it properly my theme installed and i was ready to go.

rake install\[cleanpress\]

After running that command I got the expected output which I’ll show below for reference:

$ rake install\[cleanpress\]
theme is already installed, proceeding will overwrite existing files. Are you sure? [y/n] y
## Copying cleanpress theme into ./source and ./sass
mkdir -p source
cp -r .themes/cleanpress/source/. source
mkdir -p sass
cp -r .themes/cleanpress/sass/. sass
mkdir -p source/_posts
mkdir -p public

This also applies for any other commands in square brackets such as:

rake new_post\["New Title"\]

Comments? @reply to @opinion8d_logic on twitter.