Last Updated: February 25, 2016
·
1.745K
· avnerner

Switch 'rails console' to use Pry as REPL

So, you too may have switched from plain IRB to using PRY (http://pryrepl.org/).

How could would it be if your rails up could also use PRY ?

It's a simple change to apply in ** config/environments/development.rb ** :

<MyApp>::Application.configure do
    silence_warnings do
        begin
            require 'pry'
            IRB = Pry
        rescue LoadError
        end
    end
end

See original reference from:
http://www.dotnetguy.co.uk/post/2011/08/23/replace-the-rails-console-with-pry/