Skip to content

Instantly share code, notes, and snippets.

@banister
Forked from MyArtChannel/development.rb
Created April 27, 2011 14:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save banister/944326 to your computer and use it in GitHub Desktop.
Save banister/944326 to your computer and use it in GitHub Desktop.
Use Pry as IRB replacement in rails 3 console
# Add this to the end of your development.rb and add
#
# gem 'pry'
#
# to your Gemfile and run bundle to install.
silence_warnings do
begin
require 'pry'
IRB = Pry
rescue LoadError
end
end
@stephencelis
Copy link

silence_warnings seems rather sloppy, why not:

Object.send :remove_const, :IRB
::IRB = Pry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment