I have organized my javascript files in a couple of directories and I have found the following strange behavior. Given the following tree:
+ app
+ assets
+ javascripts
+ common
+ public
+ common
+ home
- home.js
home.js
looks like this:
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_directory ../../jquery_plugins
//= require_directory ../../common
//= require_directory ../common
//= require_self
Now the trick lies in the jquery_plugins
directory. I placed this inside vendor/assets/javascripts
(which is included in the asset load path, when I check Rails.application.config.assets.paths
). When I do this I get the error: require_tree argument must be a directory
. When I move that directory to app/assets/javascripts
then everything works.
Does anybody have a clue as to what I'm doing wrong? Or is this a bug?