1

I am using heroku for my rails app. And I precompile assets locally and then deploy. So whenever I run bundle exec rake assets:precompile

my URLs in scss are converted from relative paths to absolute paths in precompiled scss so /home.png is converted to http://localhost:3000/home.png

How can I get relative paths in the precompiled files too?

Saqib Shahzad
  • 982
  • 12
  • 28

1 Answers1

0

This will happen if config.asset_host is non-nil. You only need to set it if you're using a CDN otherwise, ensure that it's nil.

Ritchie
  • 1,486
  • 1
  • 15
  • 19