简体   繁体   English

脚本文件夹中的子文件夹

[英]Subfolders in script folder

I have a ton of scripts in my script folder want to organize the scripts in subfolders. 我的脚本文件夹中有很多脚本想要组织子文件夹中的脚本。 For example, I moved user_prune script to bg_jobs subfolder. 例如,我将user_prune脚本移至bg_jobs子文件夹。 When I try to run the script... 当我尝试运行脚本时...

script/bg_jobs/user_prune

...from the console I get this error: ...从控制台我收到此错误:

script/bg_jobs/user_prune:2:in `require': no such file to load -- script/bg_jobs/../config/environment (LoadError) from script/bg_jobs/user_prune:2:in `<main>'

Why am I getting this error? 为什么会出现此错误? And what do I have to do to run scripts in subfolders? 我该怎么做才能在子文件夹中运行脚本?

Just looks like a relative path issue with including the environment. 看起来与环境有关是一个相对路径问题。 Try adding another ../ to the path on line 2 of the script. 尝试将另一个../添加到脚本第2行上的路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM