From: Daniel Berger Date: 2008-04-20T03:19:34+09:00 Subject: Re: win32-service-0.6.1 using a Rails Model david wrote: > Windows 2000 SP4 > Ruby 1.8.6 > Rail 1.2.6 > > I'm trying to create a Rail application for our internal use to > provide a one stop access to services. I'm currently trying to get the > Server.status, Service.stop and Service.start to work through a model > in Rails. The Service.* functions work well through Ruby itself, but > seems to have problem through a Rails Model. I've been trying to > display the status of the MySQL service. > > The following error is posted to the development.log. > > Processing ServicectlController#show (for 127.0.0.1 at 2008-04-19 > 11:53:46) [GET] > Session ID: d446bf0a6cad825dbf5d1a78e6853706 > Parameters: {"action"=>"show", "controller"=>"servicectl"} > > Win32::Service::Error (T): > c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.6.1-x86-mswin32-60/ > lib/win32/service.rb:920:in `status' > C:/Shared/SourceCode/Rails/sandbox/app/models/servicectl.rb:14:in > `servicestatus' The line number indicates that OpenService() function call failed, but I'm not sure why. I've forwarded this to the win32utils-devel list. I can only speculate at this point that it's something to do with the way it's interacting with WEBrick, but I'm not sure. We'll keep you posted. Regards, Dan