This is more tricky than it should be because url_for, asset_path, etc. all rely on different mechanisms.