# Octopress New Post Alias

Since I’ve switched to Octopress, I’m constantly bumping into issues that I assume are the result of my lack of Ruby knowledge. The first was having to install rvm (to get a particular version of Ruby? I don’t remember). Now, after a system upgrade, I’m getting:

Gem::LoadError: You have already activated rake 10.4.2, but your Gemfile requires rake 10.3.2. Prepending bundle exec to your command may solve this.


Okay. I can do that, but while I’m at it, I thought it might be simpler to just create an alias for Octopress’ rake commands. So, I’ve added the following file to my system at /usr/local/bin/octo:

#! /bin/bash
bundle exec rake "\$@"


Now, to create a new post, all I need to type is:

octo new_post['My title goes here']


Yes, I know ‘octo’ isn’t any shorter than ‘rake’, but it’s shorter than ‘bundle exec rake’ and it saves me the trouble of investigating Ruby-land enough to figure out why the plain old rake command is no longer working.

Update: After writing this, I ran into another issue that required I run bundle update safe_yaml. Something about that seems to have solved this problem, too (so that it’s no longer necessary to prepend bundle exec to the rake command). Nonetheless, I think I’ll keep the ‘octo’ alias. I like it.