ZSH and Rake Tasks!

While ZSH is definitely a nice and "smarter" shell, you definitely
will find a few gotchas with rvm, git, and now with rake.

What you will typically find if you try to run a rake task with
multiple arguments from the command line is this error:

> rake foo:bar[fido]
> zsh: no matches found:

Two things will help rectify this:
1. create an alias in your .zshrc file for "alias rake=rake noglob"
2. you need to escape those brackets on the command line. So instead
of "rake foo:bar[fido]", run it as "rake foo:bar\[fido\]" [1]

Voila! Happy hacking!

Credits:

[1] http://robots.thoughtbot.com/post/18129303042/how-to-use-arguments-in-a-rake-...

zsh and rvm gotcha!

I decided I wanted to increase my nerd cred and try out zsh using the "Oh-My-Zsh" gem (https://github.com/robbyrussell/oh-my-zsh). While everything was fine in terms of installation, when I started to load up my apps by navigating to the appropriate directories where the .rvmrc files lives, the rvm was not set correctly.

Thankfully, two fixes got everything working. One, you'll need to edit the "lib/rvm.zsh" file and add the following lines:


if [[ -s $HOME/.rvm/scripts/rvm ]]; then
   unsetopt auto_name_dirs

   source $HOME/.rvm/scripts/rvm
fi

 

Finally, add this to your .zshrc file after the source $ZSH declaration:

[[ -s $HOME/.rvm/scripts/rvm ]] && __rvm_project_rvmrc

 

And voila! You're up and running with zsh and rvm!

Credit goes to https://github.com/tinogomes/oh-my-zsh/blob/master/lib/rvm.zsh