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
Rails 3.1.0 - asset:precompile fails when using asset_url() SASS function #2765
Comments
correct method is |
Just got the same problem (I tried with different method : assert_url, assert_path, image_path ) |
According to the sass-rails documentation - asset-url() is correct (i.e. hyphenated in SASS, underscored in Ruby) |
You need to set :
but it seems really weird that is needed to run :
because comment says : "Don't fallback to assets pipeline if a precompiled asset is missed" |
That's stange. config.assets.compile = true in config/environments/production.rb did the trick.
|
Apologies @flop I tried your suggestion again. This DOES solve my problem. Thanks a lot for your help. config.assets.compile = true |
@rickclare you're welcome |
Your app must work setting Check the fix here: https://github.com/rails/rails/pull/2768/files |
@flop @rickclare can you test with |
Yep it working fine now on 3-1-stable |
Thx @guilleiguaran |
Imo it's really bad that for those small but very annyoing bugs no hotfix gets released within a couple of hours. I mean this patch has no side-effects for sure..so why not release early and make many many users of rails happy with an in fact working 3.1 release. Is it that much of work? |
@gucki use 3.1.1.rc1, final version will be available on Friday |
@spastorino Thanks! Unfortunately 3.1.1.rc1 does not work for me.
My production env config looks like this
|
@gucki ok let's fix that for 3.1.1, can you show an way to reproduce it? I guess it's just calling the favicon_link_tag. |
@spastorino Actually I was trying using the favicon_link_tag but couldn't reproduce it on production env |
@spastorino: Oh, I didnt know favicon_link_tag exists g, I just use image_tag or image_path everywhere. But looking at https://github.com/rails/rails/blob/master/actionpack/lib/sprockets/helpers/rails_helper.rb#L121 and having |
Ok, looking at https://github.com/rails/rails/blob/master/actionpack/lib/sprockets/railtie.rb#L29 I see that |
@spastorino Ok, shame on me. Everything seems to be generated directly, I just found out that the link to this file was outdated and is now named differently. After fixing this, rc1 works like a charm. Sorry and thanks for the great work! :) |
+1 for getting 'image not precompiled' errors when using image-url() helpers in sass on 3.1.0. If I went hacky and added .erb to the .scss and .sass files (even though I didn't use any erb stuff), it worked… Seems to be solved in 3.1.1rc1. |
I receive a error, after upgrade from Rails 3.1.0.rc6 to Rails 3.1.0,
This is occurring when I use the sass-rails asset_url method:
The line in style.css.scss (required in application.css) is:
I have attempted to add the following configuration in application.rb, but this does not fix the problem
The text was updated successfully, but these errors were encountered: