Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Become a Rails Ninja with IRB Hacks

Become a Rails Ninja with IRB Hacks

For all you Rails developers tapping your fingers waiting for your pages to load so that your model changes appear - help is at hand in the form of the irb (interactive ruby) console - where you can interact with your rails app from a prompt.

Getting started with the Rails console is really easy and Amy Hoy, frequent author of getting-started guides wrote about her experiences starting up with irb. Want to start on the long road to ninja excellence? Have a good rummage through her excellent tips.

You already know all that stuff - no worries - because the good stuff is just starting. A number of developers have been crafting their own environments, building out a mixture of scripts and gems to create their ultimate environments. We've chosen some of the best to share with you - pick what you like and craft your own.

First we'll start with wirble. Wirble makes your irb colorful - enabling you to quickly see the output from your code. Enabling it is a simple 4 line hack - with the benefits starting right away.

Next are tips from Dr Nic. The good doctor has created a gem - what_methods - which enables you to run .what? on an object to find out more information about an item.

Finally is the ultimate shuriken. To truly be a ninja you should be familiar with these techniques - mapping your app, popping into vim (textmate examples exist elsewhere) and popping into the shell to run svn and shell commands - the shuriken is a fantastic tool for interacting with rails and ruby - and will turn you from a knight into a true ruby ninja.

Rate this Article