#316 - Found a temporary solution, adding it to readme. #317

Merged
merged 1 commit into from Mar 21, 2013

Conversation

Projects
None yet
4 participants

Rails 4 changes asset pipeline slightly so images in lib and vendor won't be precompiled. I don't know what's the point of this change but anyways...

For more info see: rails/rails#9317

Contributor

trisweb commented Mar 21, 2013

Good to know. The recommendation looks fine to me. Thanks for debugging this.

@trisweb trisweb added a commit that referenced this pull request Mar 21, 2013

@trisweb trisweb Merge pull request #317 from PatrickMa/master
#316 - Found a temporary solution, adding it to readme.
211da25

@trisweb trisweb merged commit 211da25 into twbs:master Mar 21, 2013

1 check passed

default The Travis build passed
Details

@trisweb @thomas-mcdonald Are there any plans to fix this issue permanently?

From Rails upgrade guide,

In Rails 4.0, precompiling assets no longer automatically copies non-JS/CSS assets from vendor/assets and lib/assets. Rails application and engine developers should put these assets in app/assets or configure config.assets.precompile.

Is there any reason to not move the assets into app/assets as per the Rails team's recommendation?

Member

thomas-mcdonald commented Jul 10, 2013

I think we can modify config.assets from within the engine, but I haven't really delved into Rails engines before. I wouldn't have thought app/assets is the proper place for these to go.

Yeah I had the same thought too at first. You can see the explanation here.

It seems the basic idea is that they want to avoid any optional or "loose" files that are included in a gem to be precompiled along with the app automatically. Also, not autoloading lib and vendor is the standard behavior in a Rails app, so I guess it makes sense to mirror that behavior when precompiling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment