Using binding.pry in Rails app's view or partial

valk picture valk · Jan 29, 2013 · Viewed 15.7k times · Source

Pry is quite amazing in my R3 app. But any chance I can use

<% binding.pry %> 

in a view or a partial like I did previously with

<% debugger %>

This doesn't seem to work. Thanks.

Answer

Abe Voelker picture Abe Voelker · Jan 29, 2013

It's always worked for me... you might need to require it.

<% require 'pry'; binding.pry %>