Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depend_on_asset now required for all assets? #125

Closed
spohlenz opened this issue Apr 9, 2014 · 1 comment
Closed

depend_on_asset now required for all assets? #125

spohlenz opened this issue Apr 9, 2014 · 1 comment
Labels

Comments

@spohlenz
Copy link

spohlenz commented Apr 9, 2014

(Moving this here from rails/sass-rails#203 as per @guilleiguaran's suggestion)

On a new Rails 4.1 app, there seems to have been a significant change to the way asset dependencies are handled.

Given app/assets/stylesheets/application.css.sass:

body
  background: image-url("bg.png")

this produces the following error because there is no depend_on_asset directive:

Sprockets::Rails::Helper::DependencyError: Asset depends on 'bg.png' to generate properly but has not declared the dependency

Surely, any call to the image-url function (or any of the other asset helper functions) should automatically declare this dependency?

I also found this tweet which illustrates how absurd this can potentially get: https://twitter.com/libc/status/453659390231728129

@guilleiguaran
Copy link
Member

/cc @schneems @rafaelfranca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants