Run binding.irb automatically when an error occurs.
Add this line to your application's Gemfile:
gem 'autoirb'
And then execute:
$ bundle
Or install it yourself as:
$ gem install autoirb
$ ruby -rautoirb your_script.rb
If an error occurs, execute binding.irb with the binding that occurred.
If you want to use pry instead of irb, replace -rautoirb
with -rautoirb/pry
.
Bug reports and pull requests are welcome on GitHub at https://github.com/nodai2hITC/autoirb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Autoirb project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.