You have written a kick-ass Rails application using your favorite suite of tools. You find out from your boss that he thinks Linux is evil and open source is the spawn of Satan. However, he loves your app and tells you to deploy it on the Windows server.
Apache Installer
MySQL Installer
Ruby Installer
Install Ruby, being sure to install Ruby Gems. (It is checked by default in the installation wizard.)
Open a Command Prompt and type the following commands:
c:\> gem install rails --include-dependencies c:\> gem install mongrel --include-dependencies c:\> gem install mongrel_service --include-dependencies
Create a user for your Rails application in MySQL, then create a database. Give your new user all privileges to the database.
c:\> mongrel_rails service::install -N my_sweet_app -c c:\path\to\my_sweet_app -p 4000 -e production c:\> net start my_sweet_app
The -N switch is what you would like to call your service as it would appear in the Services Control Panel. -c is the path on your hard drive to your application. -p is the port you would like to run the app on. -e production means that you want to run the application in production mode.
Test that the application is running by opening your browser and typing “http://localhost:4000”. If your application comes up, you have succeeded in installing mongrel as a service. Now it is time to configure Apache, which I will cover in another article.