how to run the ruby script/server when the system starts

hi i wanna run this command ruby script/server automatically when windows start. can any one help me out how to do this . thanks in advance

Create a link set its working dir to the path of your rails application and put the command “ruby script/server”

Then put the link in your superstar of stsrtmenu

This is started when ever the user logs in.

Don’t know a way to started before login in

i want detailed steps to use that command when the windows starts.

*I want* sounds like an order, not a desire for someone to help.

Look into how to run a command line application into a service, srvany and others.

Do your own research so when there are problems you have the knowledge to solve them by yourself.

All I know is that it depends on your windows version.

But probably it would be easier in your case to install apache webserver and mod_rails aka passenger and configure the apache as a service.

Only problem here: I don’t know if passenger runs in windows. I’m using a Linux box for all Ruby projects since I had many problems with various gems that needed to be natively build.

mod_rails is POSIX only.

mod_rails aka passenger has not been ported to windows. You can configure mongrel and mysql as services and set them to start at startup. You could also write a small script and put it in the startup folder to be run when you login. Either works but you need to do some research on how they will work on your version of windows.

Norm

no no its not a order Mr.Luis Lavena seeking for help that’s it. i have written a batch file for that command. i want to run that batch file automatically when windows start. looking for this process. i already my started my research 5 days back only could not find a proper way.

no no its not a order Mr.Luis Lavena seeking for help that's it. i have written a batch file for that command. i want to run that batch file automatically when windows start. looking for this process. i already my started my research 5 days back only could not find a proper way.

If you have a batch file that you want to run on Windows startup then that is a Windows question, not a Rails question so you might be better asking on a Windows list rather than a Rails one. I believe most people here use Linux or Mac (which are both much better for Rails than Windows is) so this is probably not the best place to ask. Googling for windows run on startup seems to produce a number of useful looking links.

Colin

You’re better asking a Windows guy than a Rails group.

You can probably run the batch file as a service on Windows, but how to do that is beyond me.

Peter

I did include in my response some hints that would help you figure it out: srvany is one.

The other way is use scheduled task and make them run on user session start.

You can ask more Windows-specific questions at RubyInstaller group:

http://groups.google.com/group/rubyinstaller/