Question

Seemingly out of nowhere a rails project has broken for me on my local machine. The same codebase is working on production though, interestingly enough.

As soon as any asset tries to load I get the following error:

undefined method `dependency_digest' for #<Sprockets::StaticAsset:0x007fefb93d0d28>

The error appears even as the site tries to load the stylesheet_link_tag, but it seems to be happening for all assets.

Inasmuch as I can tell, I've made no changes to incite this error. In fact, the local server was working (both with pow and webrick) and then, just stopped. After no changes.

I've tried reverting the history back through my commits, but with absolutely no luck.

Any ideas?

Was it helpful?

Solution

This should solve it.

rake tmp:cache:clear

OTHER TIPS

On Heroku, I ran into this problem after switching around some buildpacks. The accepted answer on this SO post did NOT fix my problem (rake tmp:cache:clear) although it may have fixed other people's problems, the only way I could fix this was using:

heroku repo:purge_cache -a appname

see https://github.com/heroku/heroku-repo for documentation on the heroku repo plug-in

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top