I am looking to get began writing some Ruby on Rails applications and also have been effective with Mongrel but, Let me deploy my applications to my Apache 2.2 instance on Home windows? All of the lessons I have found appear outdated and therefore are for older versions of Apache/Rails.

Does anybody are conscious of a great, current tutorial for setting up Apache 2.2 for Ruby on Rails applications?

EDIT: A minimum of until there is a Phusion Passenger for Win, Apache + Mongrel is what you want. You should use Apache + FastCGI without Mongrel, but under real loads you're going to get (more) zombie processes and (more) memory leaks.

You might take a look at proxying to Thin in the same manner as detailed below. However, I have had some instabilities with Thin on Win, despite the fact that it's substantially faster. AB (Apache Benchmark) is the friend here!

Setting up Apache + Mongrel on Home windows isn't considerably not the same as *nix.

Basically, you have to proxy demands entering Apache to Mongrel. What this boils lower to is one thing such as this:

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_http_module modules/mod_proxy_http.so

<VirtualHost localhost:80>

    ServerName world wide web.myapp.comm

    DocumentRoot "C:/web/myapp/public"

    ProxyPass / http://world wide web.myapp.com:3000/

    ProxyPassReverse / http://world wide web.myapp.com:3000/

    ProxyPreserveHost On


Stick this inside your httpd.conf (or httpd-vhost.conf if you are including it).

It assumes you are likely to run mongrel on port 3000, your Rails root is within C:webmyapp, and you will access the application at world wide web.myapp.com.

To operate the rails application in production mode:

mongrel_rails start -p 3000 -e production

And you're ready to go (really mongrel defaults to port 3000 which means you could skip -p 3000 if you would like).

The primary difference is you cannot daemonize mongrel on Home windows (i.e. allow it to be run without anyone's knowledge). Rather you are able to do the installation like a service while using mongrel_service jewel.

Also, managing a cluster is much more complicated and also you will not have the ability to use Capistrano. Tell me if you would like more information.

I am a new comer to RoR and also have been trying exactly the same factor on Home windows Server 2008, here are a few additional notes on getting mongrel going like a service:

if you achieve compilation errors when setting up mongrel_service:

jewel install mongrel_service

use a binary rather by indicating your platform:

jewel install mongrel_service --platform x86-mswin32

Furthermore, to really install the service you have to run this command inside your RoR's application directory:

mongrel_rails service::install --title MyApp -e production -p 3001 -b ...

(in order to remove:

mongrel_rails service::remove --title MyApp


Then you definitely should have the ability to start/stop the application "MyApp" inside your home windows services user interface.

Hope that can help someone.

Right now Mongrel doesn't work correctly with Ruby 1.9 and can throw a "msvcrt-ruby18.dll not found" error when performing the command mongrel_rails.

Thin within this situation appears to be the sole option for the time being.

I recommend using Phusion Passenger for Rails within Apache.

http://world wide web.modrails.com/index.html

Documentation with install particulars can be obtained at: http://world wide web.modrails.com/documentation/Customers%20guide.html

Update: Did not browse the question carefully enough, skipped the home windows part. Sorry!