image_path('toto.png') in a scss is not prefixed by sub uri when app is deployed on a sub uri context : RAILS_RELATIVE_URL_ROOT is not used. I have a patch to correct this problem here : https://github.com/bpaquet/sass-rails/commit/f83a59fe2052dc7ba8c2d0bc9c8a653fad47fb08 I'm not sure it's the better way to solve this problem. Remark : I have to set RAILS_RELATIVE_URL_ROOT when I run `rake assets:precompile`