-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Hi, just opened pry/pry#1743. I know now that recent Rails versions only mix in reload!
and friends to the top-level REPL context, as opposed to mixing them into Object
, which means they won't be available inside a binding.pry
session in the context of a specific class.
@rf- said:
You might be able to make it work by running extend
Rails::ConsoleMethods
after starting the session (possibly after runningrequire "rails/console/app" and require "rails/console/helpers"
). If that doesn't help then feel free to open an issue on pry-rails and we could discuss ways of making this easier.
Running that in my Rails binding.pry session did indeed work. Now I'd like to avoid typing it every time I run pry. To that end, I tried pasting it into my ~/.irbrc
file, and into a ~/.pryrc
file, but it didn't seem to work.
Any tips for making pry run this automatically for future Rails sessions?