Rails Asset - NoMethodError `dependency_digest`

It seems that out of nowhere the rail project broke for me on my local machine. The same code base is working on production, although it is quite interesting.

As soon as an object tries to load, I get the following error:

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

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

As far as I can tell, I have not made any changes to incite this error. In fact, the local server worked (both with pow and webrick), and then just stopped. Without changes.

I tried pushing history back through my commits, but no luck at all.

Any ideas?

+7
ruby ruby-on-rails ruby-on-rails-4 assets nomethoderror
source share
2 answers

This should solve the problem.

rake tmp:cache:clear

+11
source share

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

heroku repo:purge_cache -a appname

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

0
source share

All Articles