문제

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?

도움이 되었습니까?

해결책

This should solve it.

rake tmp:cache:clear

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top