I've created a rake task that does various things, one of which is
calling a script. When I call that script from my Rails.root folder,
it works, but it doesn't work inside my rake task. [This is rails 3]
That is, the following line works from bash:
However, inside my rake task, this line does not work:
puts `lib/daemons/mailer_ctl start`
The error message is:
lib/daemons/mailer_ctl:3:in `require': no such file to load -- daemons
So, it can't be a problem with the current working directory, because
it found the file to execute.
The daemon is very typical. The first few lines are:
So, the require for rubygems must have succeeded, since it failed on
the require for daemons.
Why does it work from the command line, but not from the rake task?