You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Michael Glorioso <mi...@gmail.com> on 2011/01/13 15:13:00 UTC

[daemon] JRuby can't find rubygems when running from Commons Daemon Jsvc

I'm running a JRuby application on a small Linux server. I'm attempting to
make the application run as a daemon using Commons Daemon Jsvc. After
implementing the daemon for JRuby as described
here<http://groups.google.com/group/jruby-users/browse_thread/thread/7e8efe102e2e8aa6>by
Nick Griffiths, my application fails to start reporting that the
required
file 'rubygems' cannot be found. When running the application from the
command prompt, rubygems is found and the application runs normally. I have
tried various methods of including the rubygems files in the path when
running as a daemon with little success. Once rubygems has been found,
another file can't be found. I don't want to have to specify the path to
every required file.

Why would running as a daemon cause rubygems to not be found? How can I fix
it?
What other information is needed to help to determine the cause?

Thanks for your time,
-Mike

Arch Linux
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3)
commons-daemon-1.0.4
rubygem version 1.3.1

Re: [daemon] JRuby can't find rubygems when running from Commons Daemon Jsvc

Posted by Mladen Turk <mt...@apache.org>.
On 01/13/2011 03:13 PM, Michael Glorioso wrote:
> I'm running a JRuby application on a small Linux server. I'm attempting to
> make the application run as a daemon using Commons Daemon Jsvc. After
> implementing the daemon for JRuby as described
> here<http://groups.google.com/group/jruby-users/browse_thread/thread/7e8efe102e2e8aa6>by
> Nick Griffiths, my application fails to start reporting that the
> required

This link doesn't help a bit.

>
> Why would running as a daemon cause rubygems to not be found? How can I fix
> it?
> What other information is needed to help to determine the cause?
>

If it starts from the command line then it should via
jsvc as well. However in jsvc two users are involved;
root and actual user. This means that they both
must have the same environment vars your app depends on.


Nevertheless, without actual log it's hard to tell
what is going on and where the point of failure might be.
You will need to provide more info.

First thing to check is
./jsvc -version -debug ...

Just to see if the required params are set correctly.
What does this produce on your app?


Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org