开发者

Subfolders in script folder

开发者 https://www.devze.com 2023-02-09 23:31 出处:网络
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.When I try to run the script...

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. 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 sub开发者_如何学Cfolders?


Just looks like a relative path issue with including the environment. Try adding another ../ to the path on line 2 of the script.

0

精彩评论

暂无评论...
验证码 换一张
取 消