Hi Ben,

Are you running the webserver in development mode? By default sprockets
won't reference the digest version unless it's enabled with
`config.assets.digest = true`, but I wouldn't recommend using that in dev.

I think sprockets changed the defaults for what gets included in the
pre-compilation step for Rails 4 (I have had a lot of issues with fonts in
4 that were fine in 3). Try adding this to application.rb:
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.svg *.eot *.woff
*.ttf)

rm -rf public/assets
RAILS_ENV=production rake assets:precompile

Run rails server in production mode to have it serve the digest assets. If
that doesn't work, gist your application.rb,
config/environments/development.rb, and config/envrionments/production.rb.

James


On Mon, Jan 27, 2014 at 4:14 PM, Benjamin Wanicur <[email protected]>wrote:

> Hello Ruby Friends!
>
> I've burned a few too many hours on this, so I suppose it's time to reach
> out for help...
>
> I've written a Rails 4 app and I'm using the sass-rails gem.  In my *.
> css.scss files I am using the image-url and font-url helpers to refer to
> fonts and images I am using in the CSS.  After running RAILS_ENV=production
> rake assets:precompile,  I noticed that the generated
> public/assets/application-xxxxxxx.css file is not referring to assets using
> the SHA finger print.  Here is an example:
>
> I have an image that was precompiled into public/assets like so:
>
> public/assets/some-image-name-xxxxxxxxxxx.png
>
> In my public/assets/application-xxxxxxxxxxx.css file, the CSS references
> the image like this:
>
> background-image:url(/assets/some-image-name.png)
>
> I suspect the image-url helper from the sass-rails file is not working,
> but I cannot figure out why.  I am having the same problem with the
> font-url helper that sass-rails provides.  Anyone else encounter this issue
> before ?
>
> Ben W
>
> --
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby
> ---
> You received this message because you are subscribed to the Google Groups
> "SD Ruby" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
--- 
You received this message because you are subscribed to the Google Groups "SD 
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to