sprockets-rails icon indicating copy to clipboard operation
sprockets-rails copied to clipboard

`assets.compile=false` ignores `assets.prefix`

Open philipmw opened this issue 11 years ago • 1 comments

My Rails app has two environments, development and prod. In development, assets.compile is true, and in production it's false. assets.prefix is set to the same value for both.

With sprockets-rails 2.0.x, everything as expected: in both environments, my javascript_include_tags and stylesheet_include_tags include the assets.prefix in the generated path.

After upgrading to sprockets-rails 2.1.4, in development my asset tags include the prefix, while in production they do not. In production, assets are prepended with the standard /assets instead of my custom prefix. Meanwhile, rake assets:precompile and rake assets:upload continue to respect the prefix. So, assets are uploaded to the correct path, but then the Rails app looks for them where they don't exist.

philipmw avatar Sep 05 '14 06:09 philipmw

Hmm, sounds like it could have been a regression in https://github.com/rails/sprockets-rails/pull/136/files. You're still seeing this bug, right?

josh avatar Nov 29 '14 22:11 josh