less-rails doesn't generate digest assets with assets:precompile

134 Views Asked by At

I am building a gem and have some assets in namespace under the less, fonts and the images folder. In each of the less files wherever there is a url('') for font or image, I am using asset-url('') with the same contents. After that when I run rake assets:precompile RAILS-ENV=production the rest of the urls which doesn't belong to this gem are appended with digests, but my gem just appends /assets to the url. Works fine in development but not in production.

1

There are 1 best solutions below

0
On

Solved it. The asset name started with a "/". No wonder it was ignored assuming its the real path. Works great without the leading slash.