Open Obi-TOB opened 6 years ago
We are experiencing the same issue, and seems to appear pretty randomly. Most of the times it passes correctly, but sometimes this error appears. Wonder if anyone has a clue why this happens.
I am getting exactly the same error with heroku deployment.
Ah, I might have found the issue. It's using sass helpers in .css
files.
Make sure all files you use helpers in are names .scss
, not .css
.
See https://stackoverflow.com/questions/12313612/rake-assetsprecompile-undefined-method-for-nilnilclass/42530190 for more info
All my files are .scss
and I'm getting the same issue.
Error: error in C function asset-path: undefined method `[]' for nil:NilClass
on line 201 of app/assets/stylesheets/scaffold/_forms.scss, in function `asset-path`
from line 201 of app/assets/stylesheets/scaffold/_forms.scss
from line 34 of app/assets/stylesheets/application.scss
> background-image: url(asset-path("icon-remove-bullet.svg"));
Not using Refinery but this only happens on push to prod. RAILS_ENV=production rake assets:precompile
reveals nothing. Interestingly, this doesn't break the icon in production. Any ideas where to start?
RAILS_ENV=production bundle exec rake assets:precompile
I'm stuggling to find out what the issue might be: Maybe sine change in the dependency management in the asset pipeline...
Strangly RAILS_ENV=production bundle exec rake assets:precompile
works fine, but I can't see any setting that might affect this.
Any idea where to look?