“require_tree argument must be a directory” rails 3.1.1 precompile assets

﹥>﹥吖頭↗ 提交于 2019-12-02 15:51:08
Keith Schacht

I ran into this exact same issue you described. My production server was Heroku (cedar stack). In my case the issue was that one of my:

require_tree ./mobile

Was pointing to a legitimate directory, but this directory had no files. On dev it didn't matter but something about the production setup was resulting in the error, “require_tree argument must be a directory”.

Hopefully that helps.

require_tree must be given an existing folder, but git doesn't store empty folders, therefore when you deploy on heroku, those empty folders doesn't exist.

one trick is to add an empty .keep file to the folders you want to keep.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!