The best way to debug in rails is to run your server with ruby script/server --debugger debugging enabled ruby script/server --debugger (this requires a ruby ββdebugging stone) gem install ruby-debug
You can then place <% debugger %> in your views, controllers, or anywhere (obviously, omit erb tags if they are outside the view). the terminal on which the server is running will show you the breakpoint help debugger help in a prompt where you will be told more.
source share