-
Notifications
You must be signed in to change notification settings - Fork 24
require_directory
doesn't work like expected
#183
Comments
If you want
It would have to be a file in vendor/assets/javascripts. |
I'm having the same issue. I don't see why
And have
And it will find the app/assets/javascripts/application.js:
vendor/assets/javascripts/foo.js:
|
Thank you @josh, seems I need some kind of proxy file located in my
|
I totally agree with @jacob-carlborg and thanks for the workaround. |
I have the problem too, got require_directory argument must be a relative path |
I think this issue should be reopened because several other have the same problem. |
sorry , type wrong, should be require_directory ./foo got require_directory argument must be a relative path |
Got to the same issue : My use case is that I'm going to configure a load_path at runtime (depending on the plugin I'm using), so in the main file I need to configure "require_directory stores", and stores js files will be added depending on the load_path I have configured. Please think about reopening and fixing this issue. |
I agree, this should not be only relative for require_directory, please consider reopening. |
I got this "require_directory argument must be a relative path" issue as well. Solved without proxies by specifying: |
same problem |
+1 |
1 similar comment
+1 |
Has this still not been addressed? This is obviously a continuing issue... |
After a bit more research, I understand this issue a bit more: This: While this: So, required_directory does not handle the "vendor" directory tree at all. This still seems like an issue but whatever... |
It don't work for me too, i think the './' was a reference for all the directories who rails see like 'assets', does not matter where is our assets if is in 'vendor', 'lib' or any directory we have set in our config file. For me, this is a open issue. |
+1 |
1 similar comment
+1 |
The official Rails way to solve this is a little like @jacob-carlborg suggested and is described here. In app/assets/javascripts/application.js:
In vendor/assets/javascripts/foo/index.js:
As long as the file is called index.js everything will work. All files inside of vendor/assets/javascripts/foo will be included. Nevertheless I think we have a bug here. |
So, @josh you referenced another bug report here, but there still is no explanation why To me, and apparently a lot of other people, it seems logical and more intuitive that a |
👍 @dv |
Hey guys,
I have following problem with sprockets: http://stackoverflow.com/questions/7312653/sprockets-require-directory-problem
The text was updated successfully, but these errors were encountered: