why can’t i save this custom error defined in another class?

For anyone who doesn’t know, Rails 4.2 added Spring, which keeps the application in memory when you terminate it (to speed up start times), and Rails 5.2 added Bootsnap, which caches optimised code. Either of them can keep unchanged code hanging around and because weird bugs.

One of them just bit me. It seems Bootsnap was raising the error but not making it visible outside MyClass. Deleting the cache sorted it all out:

rm -rf tmp/cache/bootsnap-compile-cache/
rm tmp/cache/bootsnap-load-path-cache

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top