A gem for dumping a whole binding and restoring it later. After restoring you can use
pry to perform delayed debugging.
WARNING this gem is not ready for production yet, please, use it only in development environment.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install binding_dumper
To dump a binding run
binding.dump # => "a lot of strange output here, that's fine"
Ideally, you should persist an output somewhere (like in the database). Let's say we have a Rails model called
Make your server to execute the code above (just put it to any controller's action), go to the console, and run:
b = Bidning.load(StoredBinding.last.data) b.pry
- Ruby >= 1.9.3 (see travis.yml for supported versions)
The simplest one is in the file
A bit more complex example with Rails environment is in
Clone the repo, run
To run all tests using current ruby version, run
To run all tests with ALL supported ruby versions, run
bin/multitest and follow the output.
To run dummy app, run
bin/dummy_rails s (
bin/dummy_rails c for console).
- Fork it ( https://github.com/[my-github-username]/binding_dumper/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request