From: Tim P. <he...@ti...> - 2007-08-30 19:35:50
|
Hey chaps I dont suppose if anyone knows if there is a way of booting a rails app (with mongrel) from a RC application is there? I guess I just need some programatic way of starting starting mongrel and then to check periodically if it is still running? Cheers Tim |
From: Jon B. <jo...@gm...> - 2007-08-30 19:56:06
|
Might want to check + see how Locomotive guys are doing it underneath ... http://locomotive.raaum.org - Jon On Aug 30, 2007, at 3:35 PM, Tim Perrett wrote: > Hey chaps > > I dont suppose if anyone knows if there is a way of booting a rails > app (with mongrel) from a RC application is there? I guess I just > need some programatic way of starting starting mongrel and then to > check periodically if it is still running? > > Cheers > > Tim |
From: Tim P. <he...@ti...> - 2007-08-31 08:31:18
|
Hey Jon As far as im aware there using Lighttpd/FCGI rather than mongrel, so the setup would be quite a bit more complicated I should have thought. I have been looking at the rails "script/server" command boots its mongrel instance, and they seem to be using (from the rails source) a method called "load", with this code: trap(:INT) { exit } begin silence_warnings { ARGV = parameters } load("mongrel_rails") ensure tail_thread.kill if tail_thread puts 'Exiting' end They do some other configuration before hand of course, but the thing is, I am not sure what load() its actually calling? Sorry thats out of a left field but I just wondered if anyone knew? Cheers Tim On 30 Aug 2007, at 20:55, Jon Baer wrote: > Might want to check + see how Locomotive guys are doing it > underneath ... > > http://locomotive.raaum.org > > - Jon |
From: Bryan L. <br...@os...> - 2007-08-31 10:34:32
|
On Aug 31, 2007, at 4:28 AM, Tim Perrett wrote: > > trap(:INT) { exit } > > begin > silence_warnings { ARGV = parameters } > load("mongrel_rails") > ensure > tail_thread.kill if tail_thread > puts 'Exiting' > end > > They do some other configuration before hand of course, but the thing > is, I am not sure what load() its actually calling? Sorry thats out > of a left field but I just wondered if anyone knew? > http://corelib.rubyonrails.org/classes/Kernel.html#M002059 (rdoc for Kernel#load) mongrel_rails is in the bin/ directory of your mongrel gem install install. |
From: Jon B. <jo...@gm...> - 2007-08-31 16:06:56
|
Not necessarily true ... Rails will boot the server in the order listed below, I think you may be looking @ older source(?) ... server = case ARGV.first when "lighttpd", "mongrel", "webrick" ARGV.shift else if defined?(Mongrel) "mongrel" elsif RUBY_PLATFORM !~ /(:?mswin|mingw)/ && !silence_stderr { `lighttpd -version` }.blank? && defined?(FCGI) "lighttpd" else "webrick" end end On Aug 31, 2007, at 4:28 AM, Tim Perrett wrote: > Hey Jon > > As far as im aware there using Lighttpd/FCGI rather than mongrel, so > the setup would be quite a bit more complicated I should have > thought. I have been looking at the rails "script/server" command > boots its mongrel instance, and they seem to be using (from the rails > source) a method called "load", with this code: > > trap(:INT) { exit } > > begin > silence_warnings { ARGV = parameters } > load("mongrel_rails") > ensure > tail_thread.kill if tail_thread > puts 'Exiting' > end > > They do some other configuration before hand of course, but the thing > is, I am not sure what load() its actually calling? Sorry thats out > of a left field but I just wondered if anyone knew? > > Cheers > > Tim > > > On 30 Aug 2007, at 20:55, Jon Baer wrote: > >> Might want to check + see how Locomotive guys are doing it >> underneath ... >> >> http://locomotive.raaum.org >> >> - Jon > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Laurent S. <lsa...@ap...> - 2007-08-31 15:23:59
|
Hey Tim, NSTask could also be used to launch mongrel within the appropriate Rails app directory. http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTask_Class/Reference/Reference.html NSTalk might be more reliable than the Ruby core equivalents, especially since you target OSX. Laurent On Aug 30, 2007, at 9:35 PM, Tim Perrett wrote: > Hey chaps > > I dont suppose if anyone knows if there is a way of booting a rails > app (with mongrel) from a RC application is there? I guess I just > need some programatic way of starting starting mongrel and then to > check periodically if it is still running? > > Cheers > > Tim > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |
From: Eloy D. <elo...@gm...> - 2007-08-31 20:35:18
|
Hey Tim, I'm also using the solution mentioned by Laurent atm in an application. Unless you need to be able to interact more than via HTTP this is a good viable option. My 2 cents :) Cheers, Eloy On 8/31/07, Laurent Sansonetti <lsa...@ap...> wrote: > Hey Tim, > > NSTask could also be used to launch mongrel within the appropriate > Rails app directory. > > http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTask_Class/Reference/Reference.html > > NSTalk might be more reliable than the Ruby core equivalents, > especially since you target OSX. > > Laurent > > On Aug 30, 2007, at 9:35 PM, Tim Perrett wrote: > > > Hey chaps > > > > I dont suppose if anyone knows if there is a way of booting a rails > > app (with mongrel) from a RC application is there? I guess I just > > need some programatic way of starting starting mongrel and then to > > check periodically if it is still running? > > > > Cheers > > > > Tim > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > > browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Rubycocoa-talk mailing list > > Rub...@li... > > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |