Ask A Question

Notifications

You’re not receiving notifications from this thread.

Debugging With BetterErrors Discussion

Richard Nyström Richard Nyström

Thanks! This will help me a lot.

Reply

i use pry. how is this better?

Reply

Pry is awesome as well. This is similar and doesn't need to be in your console. It's not as powerful as pry in some areas like being able to cd into objects, so you can use the two together.

Reply

Hi Chris,

I'm running into an issue when installing binding_of_caller. When I run bundle install I get the following error An error occurred while installing debug_inspector (0.0.2), and Bundler cannot continue. Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before bundling. I'm not sure how to get around this. Any ideas?

Reply

Interesting. I haven't had trouble with that gem before. Did it give you any more text for the error?

Reply

cool! I had been using `binding.pry` in my controllers to debug like this but it's definitely faster if I don't have to add and remove that line every time. thanks!

Reply

Super useful. Thank you, Chris!

Reply
Jordano Moscoso Jordano Moscoso

I don't know how i lived my days without this. Thanks.

Reply

When Rails 5 came out Better Errors was incompatible. Not sure if works with Rails 5 now. But anyway I began using the web-console gem in the development environment instead and it's actually better. It provides the same IRB console when you get an error but you can also insert the console anywhere in your app by adding 'console' in the controller action or <%= console %> in the view. And you don't need to also install binding_of_caller.

Reply

Hi Chris!

After watching this video, I remember the conversation we had that I was referring to.

We were discussing debugging. You mentioned that maybe this gem has been updated, or is now a part of rails, or something...

I'd like to use this but before trying to install, wanted to see if you remembered what it was we were discussing. Does this ring a bell?

-Monroe

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.