Just sent a PR to your app that fixes it for me: https://github.com/bwanicur/benwanicur.com/pull/1
Know though that running rake assets:precompile without specifying RAILS_ENV=production will not reference digest versions and will not compress the CSS all down to a single line. On Mon, Jan 27, 2014 at 6:12 PM, Ben Wanicur <[email protected]> wrote: > Thanks for replying James. I did try adding this line to my production.rb > config file previously: > > config.assets.precompile << /\.(?:svg|eot|woff|ttf)$/ > > but neither that nor your suggestion seems to solve my problem. I also > tried running my local server in production mode and had the same issues. > I think the compressed, application-xxxxxxxxx.css file that is created by > rake > assets:precompile should refer to the correct assets with the SHA finger > print, right ? I can clearly see this is not happening. > > Here is the gist you asked for: https://gist.github.com/bwanicur/8661227 > > I included my Gemfile in the gist also. Thanks for your help! > > > > > On Mon, Jan 27, 2014 at 5:44 PM, James Miller <[email protected]> wrote: > >> 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. >> > > -- > -- > 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.
