Ok, I have checked in the first draft of rails win32 service into examples mongrel_rails_service is the controller, and the _svc script is actually the service. The controller uses Mongrel Commands as requested by Zed, but the service was simplified for debugging purposes, later will merge and refactor both files. The environment defaults to production, so if wanted to run it on other, you must explicit so. The SimpleHandler start and stops ok, but still trying to find why CGI handler (Rails) make it fail during service stop. Will look into this tomorrow, now need a few hours to sleep ;-) -- Luis
Hi ! 2006/2/21, Luis Lavena <luislavena at gmail.com>:> The environment defaults to production, so if wanted to run it on> other, you must explicit so. SCGI Rails and Rails itself both default to development. Should wechange expectations like that ? Just a thought. Bye !--Fran?ois Beausoleilhttp://blog.teksol.info/
So very nice. I''ll boot up my win32 sys and try this out. If it all works reasonably well then I''ll setup to do another release later tonight. Great work Luis. Zed On 2/21/06 6:47 PM, "Luis Lavena" <luislavena at gmail.com> wrote:> Ok, I have checked in the first draft of rails win32 service into examples > > mongrel_rails_service is the controller, and the _svc script is > actually the service. > > The controller uses Mongrel Commands as requested by Zed, but the > service was simplified for debugging purposes, later will merge and > refactor both files. > > The environment defaults to production, so if wanted to run it on > other, you must explicit so. > > The SimpleHandler start and stops ok, but still trying to find why CGI > handler (Rails) make it fail during service stop. > > Will look into this tomorrow, now need a few hours to sleep ;-) > > -- > Luis > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users
I''ll take a look at it. My impression though is that service would be for production runs, and just console plain mongrel_rails start would be for development. Would this be a reasonable thinking for you? Zed On 2/21/06 8:29 PM, "Francois Beausoleil" <francois.beausoleil at gmail.com> wrote:> Hi !2006/2/21, Luis Lavena <luislavena at gmail.com>:> The environment defaults> to production, so if wanted to run it on> other, you must explicit so.SCGI> Rails and Rails itself both default to development. Should wechange > expectations like that ?Just a thought. Bye !--Fran?ois> Beausoleilhttp://blog.teksol.info/___________________________________________> ____Mongrel-users mailing> listMongrel-users at rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel> -users
2006/2/21, Zed Shaw <zedshaw at zedshaw.com>:> I''ll take a look at it. My impression though is that service would be for> production runs, and just console plain mongrel_rails start would be for> development. Would this be a reasonable thinking for you? Ah, it wasn''t clear from Luis'' E-Mail if that would be the case. Although, maybe service should plain error out if nothing is specified? Hmmm, on second thought, no. Zed, go ahead with what you plannedout here. Thanks !Fran?ois
Francois, sorry that I missed comment that. Zed, still the HttpServer need some work to stop the work threads. The gracefully part of it still need some work. Somehow the threading nature of Wrapper or CGI handler make the service to fail at stop, so will investigate it tomorrow The SimpleHandler works OK as service, so is CGI handler, I need to confirm this but guess I''m on the right track. Til tomorrow Luis On 2/22/06, Francois Beausoleil <francois.beausoleil at gmail.com> wrote:> 2006/2/21, Zed Shaw <zedshaw at zedshaw.com>:> I''ll take a look at it. My impression though is that service would be for> production runs, and just console plain mongrel_rails start would be for> development. Would this be a reasonable thinking for you? > Ah, it wasn''t clear from Luis'' E-Mail if that would be the case. Although, maybe service should plain error out if nothing is specified? Hmmm, on second thought, no. Zed, go ahead with what you plannedout here. > Thanks !Fran?ois > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users-- Luis
Luis, I''m sitting here playing with the win32 and it is so damn hot. You''re going to be a famous man with the win32 people. I think we should release even if it doesn''t have the stop quite right. I took the time to do a win32-service gem which I think I''ll put up on the mongrel site so people can just gem install and go. All works great so far. I also think we should take your examples/mongrel_rails_svc.rb and examples/mongrel_rails_service.rb and convert them to: bin/mongrel_rails_service bin/mongrel_rails_svc That way they can be install automagically by rubygems and available right on the command line to people. If you can make this change, sync up with svn, then I''ll do a release tomorrow. Otherwise it''s incredibly cool. It''s sad to say that Mongrel will soon have better win32 support than Unix. Zed
Hehehe, sounds good for me On 2/22/06, Zed Shaw <zedshaw at zedshaw.com> wrote:> Luis, > > I''m sitting here playing with the win32 and it is so damn hot. You''re going > to be a famous man with the win32 people. I think we should release even if > it doesn''t have the stop quite right. >Still wanted to get it working right, but more feedback should hepl this, so a release is good.> I took the time to do a win32-service gem which I think I''ll put up on the > mongrel site so people can just gem install and go. All works great so far. >Are you using the vc2003 I sent to you? adding the dependency is easy, but we need to provide the binary gem too. so win32-service and win32-service-mswin32... both gems available from mongrel site, good! :D> I also think we should take your examples/mongrel_rails_svc.rb and > examples/mongrel_rails_service.rb and convert them to: > > bin/mongrel_rails_service > bin/mongrel_rails_svc > > That way they can be install automagically by rubygems and available right > on the command line to people. >Only bin/mongrel_rails_service should be linked as executable, the _svc only will be used internally to fire it up (and cannot be fired from a batch file).> If you can make this change, sync up with svn, then I''ll do a release > tomorrow. >Ok, moving the scripts to bin, changing the extensions and doing the right change in the gem.> Otherwise it''s incredibly cool. It''s sad to say that Mongrel will soon have > better win32 support than Unix. > > ZedHehe, sounds great for me :-D Later, Luis
Hey, I did surgery on the svn repo. Moved your source so be careful when you update. Comments below... On 2/22/06 12:19 PM, "Luis Lavena" <luislavena at gmail.com> wrote:> Hehehe, sounds good for me > > On 2/22/06, Zed Shaw <zedshaw at zedshaw.com> wrote: >> Luis, >> >> I''m sitting here playing with the win32 and it is so damn hot. You''re going >> to be a famous man with the win32 people. I think we should release even if >> it doesn''t have the stop quite right. >> > > Still wanted to get it working right, but more feedback should hepl > this, so a release is good. >I just released! I''ve tested it out and it''s hot. I''ll be writing docs for the site next and then the e-mail goes out. People have been testing it like crazy for me so it should be pretty good.>> I took the time to do a win32-service gem which I think I''ll put up on the >> mongrel site so people can just gem install and go. All works great so far. >> > > Are you using the vc2003 I sent to you? adding the dependency is easy, > but we need to provide the binary gem too. >Yep, works great thanks. And I already did the dependency so when you svn update you''ll get it all.> so win32-service and win32-service-mswin32... both gems available from > mongrel site, good! :D > >> I also think we should take your examples/mongrel_rails_svc.rb and >> examples/mongrel_rails_service.rb and convert them to: >> >> bin/mongrel_rails_service >> bin/mongrel_rails_svc >> >> That way they can be install automagically by rubygems and available right >> on the command line to people. >> > Only bin/mongrel_rails_service should be linked as executable, the > _svc only will be used internally to fire it up (and cannot be fired > from a batch file). >I just kept it consistent, otherwise the gem system won''t include both scripts. I modified the source for this.>> If you can make this change, sync up with svn, then I''ll do a release >> tomorrow. >> > Ok, moving the scripts to bin, changing the extensions and doing the > right change in the gem. >Darn, just did that. Let me know if you have problems. Zed
Ok, I''m used to first to a update before my commit, got your changes before I made mines :-)> > Still wanted to get it working right, but more feedback should hepl > > this, so a release is good. > > > > I just released! I''ve tested it out and it''s hot. I''ll be writing docs for > the site next and then the e-mail goes out. > > People have been testing it like crazy for me so it should be pretty good. >Hehe, I also wanted feedback! is not fair that you get all the ppl testing and don''t inform me! ;-)> > > >> I took the time to do a win32-service gem which I think I''ll put up on the > >> mongrel site so people can just gem install and go. All works great so far. > >> > >Good, we should inform the win32utils guys of this, so no problem araises.> >> > > Only bin/mongrel_rails_service should be linked as executable, the > > _svc only will be used internally to fire it up (and cannot be fired > > from a batch file). > > > I just kept it consistent, otherwise the gem system won''t include both > scripts. I modified the source for this. >Consistent? we need to add to line #38 of Rakefile (the scripts part) only the "mongrel_rails_service" scripts=[''mongrel_rails''] to: scripts=[''mongrel_rails'', ''mongrel_rails_service''] A note: inside _svc still resides the SimpleHandler code (which I was using to test the graceful shutdown). Later we should remove it when every bug was ironed... Ok, doing the Rakefile modification :-) Luis