Notifications
You’re not receiving notifications from this thread.
Debugging With BetterErrors Discussion
i use pry. how is this better?
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.
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?
Interesting. I haven't had trouble with that gem before. Did it give you any more text for the error?
Thanks for the reply. Here's the total output:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR="
compiling debug_inspector.c
linking shared-object debug_inspector.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [debug_inspector.bundle] Error 1
Gem files will remain installed in /Users/ryan.dagostino/.bundler/tmp/17652/gems/debug_inspector-0.0.2 for inspection.
Results logged to /Users/ryan.dagostino/.bundler/tmp/17652/gems/debug_inspector-0.0.2/ext/debug_inspector/gem_make.out
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.
That sounds like your compiler is too old maybe. I'm not sure the best solution there. What version of your OS are you on and what version of Ruby are you using?
Hopefully it's not my computer running OS X 10.9 and Ruby version 2.0.0p247. You think it just needs an upgrade to the Ruby version?
I think it has something to do with the compiler on that version of OSX and/or Ruby. I just found a post on Stack Overflow that might be of help. Here are a bunch of suggestions on how to fix it: http://stackoverflow.com/qu...
Thanks for the help Chris. Regardless better errors is working. Great tutorial by the way.
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!
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.
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