SprocketsHelper#asset_path not adding fingerprint when used in an Engine #2428

Closed
petebrowne opened this Issue Aug 4, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@petebrowne

I'm building a gem to vendor MediaElement.js much like the official jquery-rails gem is built. I'm trying to package images/plugins that are referenced within in the javascript and stylesheet files. For example:

https://github.com/petebrowne/mediaelement-rails/blob/master/vendor/assets/javascripts/mediaelement.js.erb#L553
and
https://github.com/petebrowne/mediaelement-rails/blob/master/vendor/assets/stylesheets/mediaelementplayer.css.erb#L54

In development, this works as expected. The paths are correctly outputted when the files are compiled.

In production (along with rake assets:precompile RAILS_ENV=production) the fingerprints are not added to the path.
This is only when asset_path is used within the Engine itself. You can reference the assets provided by the Engine using asset_path in the app and that works fine.

This was tested with: Rails 3.1.0.rc5 and Sprockets 2.0.0.beta.12.

@petebrowne

This comment has been minimized.

Show comment Hide comment
@petebrowne

petebrowne Aug 8, 2011

I tested this again and had no issues with the following gems:

gem "rails", :git => "https://github.com/rails/rails.git", :branch => "3-1-stable"
gem "sprockets", "2.0.0.beta.12"

I tested this again and had no issues with the following gems:

gem "rails", :git => "https://github.com/rails/rails.git", :branch => "3-1-stable"
gem "sprockets", "2.0.0.beta.12"

@petebrowne petebrowne closed this Aug 8, 2011

@robmathews

This comment has been minimized.

Show comment Hide comment
@robmathews

robmathews Sep 25, 2011

I ran across this with rails 3.1.1, and managed to work around to by using rc1:

source 'http://gems.github.com'
gem 'rails', '3.1.1.rc1

I ran across this with rails 3.1.1, and managed to work around to by using rc1:

source 'http://gems.github.com'
gem 'rails', '3.1.1.rc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment