Tuesday, February 26, 2008

how to cheat with ruby gems

It's nice to have a quick reference of commands for whatever technology you are working with. I noticed a Capistrano cheatsheet hanging up in a coworkers cubicle today. I think it was the one that used to be available at this link: http://weblog.rubyonrails.org/2006/9/30/capistrano-cheat-sheet but it now seems to result in a Rails application error.

I went looking for a mirror of it and ended up finding something I like better. Ruby developers at ErrFree have set up a great gem called "cheat". More info on the cheat page. Short version:

You can install the "cheat" gem with "sudo gem install cheat" which works out of the box on MacOS/X Leopard. This will allow you to snag & view cheatsheets, which are downloaded into .cheats/ in your home directory.

To see how to use cheat run:
cheat cheat

Or to view any cheat simple run
cheat [cheatname]

And if you want to snag the latest version just run
cheat --new

The cheats are served up from a lightweight wiki, which you can add to and update. No usernames or passwords, just a kaptcha to keep spammers out. I added an entry to see if it was as easy as it looked. The Oracle cheat now contains

See current time: