SCGI start up from boot, pls help

Hi I have SCGI working on my rails applications and it seems to work
well. What I’m trying to do is create a script so that on boot up the
scgi process will start up as a service.

I have a Solaris 10, x86 system.

I’ve written the script, in ruby, and it works when I run it from a
shell. It simple systems a bash -c ‘change appropriate directory; ruby
scgi_ctrl start’. it works when i run it as both me and root.
When I put it into the service start up area I see that it does run on
boot up, from my logs, but it always fails to start the scgi process.
Any ideas as to why?

cheer.