I've been round and round here with trying to get the assets to pre-compile on my production server (straightforward ubuntu install with ruby 1.9.2 and Rails 3.1.1, and tried 3.1.2RC with the new sprockets 2.10 as well).
"require_tree argument must be a directory". I've seen other issues related to this on stack but the situation isn't exactly the same and none of the proposed solutions have helped – like create a stub file in the sub folder, then reference only relatively at that point. No luck.
And to top it off, of course this works perfectly on all development machines (mac's but with identical configs, even matching gem for gem), in production env.
Here is my /app/assets/javascript/application.js:
//= require ../../views/app/manifest
//= require_self
Not much to it. Basically just pointing to the real manifest file for the app area (yeah, not exactly boxed vanilla Rails but...)
Here is my stub manifest in my views/admin (/views/app/manifest.coffee.js):
# = require ./app
# = require_tree ./models
# = require_directory ./views <- or using require_directory, either would work fine.
Like I said, in dev env, no issues at all. The asset pipeline compiles on the fly and everything is great. Running, rake assets:precompile on the dev machine, no issues either.
I send it up to the production machine and run the exact same code and I get:
require_tree argument must be a directory
There has to be some tiny tiny difference here that I'm just not seeing. Any help would be much appreciated!
.gitkeep
files (or.gitignore
files to your empty dirs. – Appositive