Roney Banerjee
Roney Banerjee

Reputation: 333

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

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.

Upvotes: 0

Views: 124

Answers (1)

Roney Banerjee
Roney Banerjee

Reputation: 333

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

Upvotes: 1

Related Questions