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 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.
精彩评论