Disable Spring when debugging gems

I spent a good 45 minutes puzzled as to why byebug wasn’t working from within a gem I’m debugging.  Even more confusing was that when I set byebug in the gem code along with some debugging code, and stepped into the gem, I saw my code edits along with the call to byebug… but the new code was never reached, it was as if it was being skipped right over.  Odd.

Went for a cup of coffee and to ponder this….

Finally, I figured out that spring was preloading the app and keeping the gems loaded – even after I changed the gem code.

For now, I’m going to keep spring disabled by setting DISABLE_SPRING=1 in my .env file.

Chris Downey

Founder, VaxCalc Labs and creator of Autovist and the Vaccine Ingredients Calculator.

Latest posts by Chris Downey (see all)

Author: Chris Downey

Founder, VaxCalc Labs and creator of Autovist and the Vaccine Ingredients Calculator.

Leave a Reply