[Ruby] How to use binding.pry [53 days left]

less than 1 minute read

I didn’t understand how to use binding.pry
A memorandum because it could be used for error resolution today

No matter how many times you click Create Room in the section Creating a new chat room, it will reload
Well this is due to the render
If an error statement appears, there will be no error if it is easy to resolve.
Well troubled

Here comes binding.pry

4-1.binding.pry.png
I thought that the create method was strange, so I decided to try pry.

4-3.binding.pry.png
HM
Normal up to here

4-4.binding.pry.png
Mumu
There seems to be a cause in the strong parameters

4-5.binding.pry.png
user_ids is displayed but no name

I thought and looked back
An ordinary mistake of the century that it became nmae instead of name

It’s a mistype rather than a misspelling

This time it was used inside the controller
I’m sure I used it in the test code

Remember binding.pry when you don’t see a clear error statement