to run window service using ruby

N

Newb Newb

Hi...
how to run window service using ruby.
i have exe file for making it to run i have to click it on.
but i want to make it to run using ruby.

Kindly Help me get along with ruby...

Thank you
 
P

Phlip

Newb said:
Hi...
how to run window service using ruby.
i have exe file for making it to run i have to click it on.
but i want to make it to run using ruby.

Kindly Help me get along with ruby...

If by 'window service' you mean the program starts when you turn on your desktop...

....put the ruby.rb file into your Start menu's Startup folder. Yes it will open
a little window. You can use rubyw.exe to fix that.

A true "windows service" is like a daemon. You run in a special place with
limited facilities, and it's generally no picnic for a beginner. I have run many
desktop apps from the Startup menu, including a lite Ruby wiki for my PIM, and I
never had any issue with it...
 
N

Newb Newb

Phlip said:
If by 'window service' you mean the program starts when you turn on your
desktop...

...put the ruby.rb file into your Start menu's Startup folder. Yes it
will open
a little window. You can use rubyw.exe to fix that.

A true "windows service" is like a daemon. You run in a special place
with
limited facilities, and it's generally no picnic for a beginner. I have
run many
desktop apps from the Startup menu, including a lite Ruby wiki for my
PIM, and I
never had any issue with it...


Thanks for the reply...

Actually i run qt program as windows service.

to start and restart i manually give command in the windows command
prompt.

now i would like to know how to run this program using our ruby...

any command or something...

pls help
 
V

Vikhyat Korrapati

Newb said:
Thanks for the reply...

Actually i run qt program as windows service.

to start and restart i manually give command in the windows command
prompt.

now i would like to know how to run this program using our ruby...

any command or something...

pls help

You can run any command as if run in a command line using the system
method, like this:

system('command to run')
 
N

Newb Newb

Vikhyat said:
You can run any command as if run in a command line using the system
method, like this:

system('command to run')

thanks much..
just curious to know about ruby classes.


Is it possible to run using ruby if so how....

Thanks
 
N

Newb Newb

Newb said:
Now i did start stop and continue and pass the windows service.
but how to Restart a windows service...
What command is needed.

Pls help me
 
A

Alexey Borzenkov

Now i did start stop and continue and pass the windows service.
but how to Restart a windows service...
What command is needed.

Have a look at win32-service gem

http://raa.ruby-lang.org/project/win32-service/

If you want to create a service that is written in ruby, then code
sample there is horribly outdated and you will need to read source code
and comments to understand how to do it in the new style. But if you
want to start/stop/restart some other service, then it works just like
on that page. Have a look.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,627
Members
45,328
Latest member
66Teonna9

Latest Threads

Top