sprockets-rails icon indicating copy to clipboard operation
sprockets-rails copied to clipboard

Erronously returning cached version on NoMethodError

Open fxtentacle opened this issue 5 years ago • 0 comments

I was just bitten by a rather annoying bug in sprocket-rails 3.2.1, the result of which was that in development mode I was seeing wrong URLs.

I tracked this down to the fact that I was being served an outdated version of the page, which had apparently been cached.

Running rake tmp:cache:clear then made the true error visible, which was

NoMethodError: undefined method `image_path' for #<Object:0x000000000c3e1398>

I believe that this is a bug in the sprocket-rails caching, that if a resource cannot be generate due to a missing context helper function, it won't return or log the error, but instead it will silently sent the (outdated) version from cache.

fxtentacle avatar Mar 31 '20 13:03 fxtentacle