Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Irb Tips and Tricks     John McCaffrey    Freelance Consultant       @J_McCaffrey    RailsPerformance.net
Here we go!• Irb is awesome• Common Usage patterns• Customizing Irb• Rails Console• References
In case I don’t finish...• IRB is extremely powerful and Customizable• A useful tool in your toolkit• Worth finding ways to ...
Irb is Awesome!   http://tryruby.org/
IRB 101• printing, dates, calculations• object inspector• requiring files• file scripting
Tweak it• irb console settings• custom methods    (I needed logging and acts_as_versioned inspection)• vim• irb subsession
What I didn’t cover• Debugging• Additional libraries• More Meta Programming• DRY concepts, testing, workflow
Resources++• Why’s IRB Guide http://bit.ly/_why_irb• http://cheat.errtheblog.com/s/rails_console• http://bit.ly/thoughtbot...
Resources+++•   http://railscasts.com/episodes/48-console-tricks•   http://slash7.com/2006/12/21/secrets-of-the-rails-    ...
Upcoming SlideShare
Loading in …5
×

Irb Tips and Tricks

2,798 views

Published on

Quick lightning talk on some cool things you can do in IRB and the Rails Console. There's more in there than you think!

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Irb Tips and Tricks

  1. 1. Irb Tips and Tricks John McCaffrey Freelance Consultant @J_McCaffrey RailsPerformance.net
  2. 2. Here we go!• Irb is awesome• Common Usage patterns• Customizing Irb• Rails Console• References
  3. 3. In case I don’t finish...• IRB is extremely powerful and Customizable• A useful tool in your toolkit• Worth finding ways to improve your usage• Ask your friends, share your ideas• ....some compatibility issues in Rails 3
  4. 4. Irb is Awesome! http://tryruby.org/
  5. 5. IRB 101• printing, dates, calculations• object inspector• requiring files• file scripting
  6. 6. Tweak it• irb console settings• custom methods (I needed logging and acts_as_versioned inspection)• vim• irb subsession
  7. 7. What I didn’t cover• Debugging• Additional libraries• More Meta Programming• DRY concepts, testing, workflow
  8. 8. Resources++• Why’s IRB Guide http://bit.ly/_why_irb• http://cheat.errtheblog.com/s/rails_console• http://bit.ly/thoughtbot-irb• http://bit.ly/tagaholic-irb• https://github.com/cldwalker/ripl• http://bit.ly/stackoverflow-irb• http://bit.ly/pivotal-debug-irb
  9. 9. Resources+++• http://railscasts.com/episodes/48-console-tricks• http://slash7.com/2006/12/21/secrets-of-the-rails- console-ninjas• http://errtheblog.com/posts/24-irb-mix-tape• http://drnicwilliams.com/2006/10/12/my-irbrc-for- consoleirb• http://vimcasts.org/episodes/running-vim-within-irb

×