Using Pry instead of IRB for Rails' console
Pry is a new-ish ruby gem that everyone should be using. Rather than me attempting to explain to you why it's so great, I suggest you skim the README. Highlights include "show-method", "edit-method", and almost everything else.
Rails doesn't make it particularly easy to use an "alternative" console, but if you stick "gem 'pry'" in your Gemfile, and paste the following code in an initializer, everything works just like magic.
# in config/initializers/pry.rb
begin
require 'pry'
module Rails
class Console
class IRB
def self.start
Pry.start
end
end
end
end
rescue LoadError
end
This is only tested in Rails 3.1. It should work in 3.0, but I don't think Rails::Console exists or works the same way in 2.3.x.