简体   繁体   中英

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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