On 01/04/2012 09:43 AM, Jan Provaznik wrote:
On 01/03/2012 11:46 PM, Matt Wagner wrote:
> Mea culpa on this. It appears that a subtle and seemingly-fine change
> of mine a while back broke dbomatic.
>
> Within a couple controllers where we needed it, I was able to do
> "require 'lib/image'" which appeared to look in the correct place
> (Rails root) and include lib/image.rb. Conductor worked fine, so life
> was peachy, I got an ACK, and committed the code last month.
>
> It seems that, for reasons I can't quite figure out, dbomatic chokes
> on this: it is unable to find the file when I reference it this way
If dbomatic is started as daemon, CWD is changed to '/', (line 131:
Dir.chdir "/"), thus relative paths don't work.
Hmpf, ignore above, I'm not able to reproduce this bug, so it's
apparently not because of changed CWD.
> and thus fails to start. Feeling like I was swimming against the
> tide, I just fixed this by moving the reference into application.rb
> and referencing it by a full path. (Though I wonder if we should be
> using Rails.root, but it works fine as-is, so I don't want to change
> it now.)
>
> -- Matt