You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've reviewed the docs, the wiki, and stack overflow posts, but am still baffled. Maybe I missed something obvious:
I've bundled pry-rails (0.11.3), which bundles pry(0.10.4). rails c correctly invokes pry, but calling binding.pry from within Rails, e.g. from with a test, invokes pry, but reload! does not work:
NoMethodError: undefined method `reload!' for SolventLayerCache:Class
Did you mean? load
Does pry have some alternate invocation besides binding.pry that I'm supposed to be using from within my code that will allow whatever Rails / IRB magic makes reload! work?
The text was updated successfully, but these errors were encountered:
Recent versions of Rails (like ones from the last few years, at least) only mix in reload! and friends in the top-level REPL context, as opposed to mixing them into Object, which means they won't be available if you have a binding.pry session in the context of a specific class. You might be able to make it work by running extend Rails::ConsoleMethods after starting the session (possibly after running require "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.
I've reviewed the docs, the wiki, and stack overflow posts, but am still baffled. Maybe I missed something obvious:
I've bundled pry-rails (0.11.3), which bundles pry(0.10.4).
rails c
correctly invokes pry, but callingbinding.pry
from within Rails, e.g. from with a test, invokes pry, butreload!
does not work:Does pry have some alternate invocation besides
binding.pry
that I'm supposed to be using from within my code that will allow whatever Rails / IRB magic makesreload!
work?The text was updated successfully, but these errors were encountered: