Chris-

On Apr 5, 2007, at 10:37 AM, Chris T wrote:

>
> OK. Made a bit of progress on this. Have setup a duplicate server
> instance with mongrel_cluster on it (really glad I went with Xen now)
> and also done a bit of following back the code with ruby-debug.
> I can now reproduce the error, but only if I (re)start the mongrels  
> with
> monit. Then, the particular page fails every time. Here's the  
> particular
> part of the montirc file that restarts the mongrel instances:
>
>     check process mongrel_8001 with pidfile
>     /var/run/mongrel_cluster/mongrel_carstuff.8001.pid
>       start program = "/usr/bin/mongrel_rails cluster::start -C
>     /home/frankg/sites/carstuff/current/config/mongrel_cluster.yml
>     --clean --only 8001"
>       stop program = "/usr/bin/mongrel_rails cluster::stop -C
>     /home/frankg/sites/carstuff/current/config/mongrel_cluster.yml
>     --clean --only 8001"
>
> However, if I manually start a mongrel instance with:
>  /usr/bin/mongrel_rails cluster::start -C
> /home/frankg/sites/carstuff/current/config/mongrel_cluster.yml --clean
> --only 8001
> the page is rendered with no problems.
>
> Couple of other things, What seemed to be happening on that page was
> that the Photo model was being reloaded, as if it was in the  
> development
> environment. It fails the first time (ImageScience fails on the  
> line env
> = ENV['INLINEDIR'] || ENV['HOME'] -- both are nil). Why it occurs on
> that page and not on others, I still haven't figured out.
>
> Will keep plugging away at this, but if anyone's got any bright ideas
> would welcome them.
>
> Thanks
> Chris
>


        Monit starts your mongrels with a fully clean environemnt. Meaning  
none of your normal ENV vars are set. WHat you need to do is put this  
in the top of your environment.rb

ENV['HOME'] = "/home/foobar"

        Then restart monit and all the mongrels. This will fix the problem.

Cheers-

-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- [EMAIL PROTECTED]
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to