janlelis / irbtools

Improvements for Ruby's IRB console 💎︎
MIT License
921 stars 27 forks source link

Reload hangs after exception in Rails console #36

Closed codehugger closed 6 years ago

codehugger commented 9 years ago

This happens consistently when errors occur in Rails code. To reproduce put the following code in e.g. a model class.

def self.cause_error
    1/0
end

Then run it, watch it fail and then call reload!

>> MyModel.cause_error
ZeroDivisionError: divided by 0
...
>> reload!
Reloading...

and watch it hang for eternity. The only work-around I have found is to restart the Rails console completely.

janlelis commented 7 years ago

Hey @codehugger!

Does this still happen with recent versions of Rails and irbtools?