Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make require_tree work with lib assets #2981

Closed
ansman opened this issue Sep 11, 2011 · 5 comments
Closed

Make require_tree work with lib assets #2981

ansman opened this issue Sep 11, 2011 · 5 comments

Comments

@ansman
Copy link

ansman commented Sep 11, 2011

Currently require_tree only works with relative paths so if you want to include all javascript in your lib dir (which you most likely want) from your application.js you need to either include them one by one or do require_tree ../../../lib/javascripts which is all kinds of wrong.

Maybe it should be called require_tree, I don't know. Just want some way of including trees from different directories.

@dmathieu
Copy link
Contributor

This is highly probably a sprockets issue, not rails.

@guilleiguaran
Copy link
Member

I think this can be solved with:

config.assets.paths << "#{Rails.root}/lib/javascripts"

@ansman
Copy link
Author

ansman commented Sep 13, 2011

No, first of it's root/lib/assets/javascripts and secondly it's already in the assets path.

The problem is that require_tree only accepts paths relative to its own directory.

@ansman ansman closed this as completed Sep 13, 2011
@ansman ansman reopened this Sep 13, 2011
@arunagw
Copy link
Member

arunagw commented Dec 18, 2011

Guys. Is this still a issue? Or this can be closed??

@guilleiguaran
Copy link
Member

I think this can be closed since there isn't nothing that we can do in Rails to fix this, as @dmathieu it should be supported in Sprockets.

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

No branches or pull requests

4 participants