Reputation: 17542
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?
Upvotes: 0
Views: 531
Reputation: 1206
Just looks like a relative path issue with including the environment. Try adding another ../ to the path on line 2 of the script.
Upvotes: 1