Mongrel Cluster and Upload Progress

OK, so I have mongrel running with the upload progress plugin a-la
http://mongrel.rubyforge.org/docs/upload_progress.html with a DRb
instance taking care of the actual uploads. This works really well in
development, however, I am running just one mongrel server locally.

When I move to my production environment, I am lost as to where I should
put the mongrel_upload_progress.conf file. The contents of this file are
as follows:

uri “/”,
:handler => plugin("/handlers/upload",
:path_info => ‘/files/upload’,
:drb => ‘druby://0.0.0.0:2999’),
:in_front => true

Now, locally, I start mongrel with the following command:

mongrel_rails -S config/mongrel_upload_progress.conf

This works fine, but on my production machine, I have been unable to
find how I go about specifying the contents of the
mongrel_upload_progress.conf in mongrel_cluster. Does anyone know how to
do this?

Any help greatly appreciated!

Matt

On Feb 8, 2007, at 11:02 AM, Matt H. wrote:

as follows:

Now, locally, I start mongrel with the following command:

mongrel_rails -S config/mongrel_upload_progress.conf

This works fine, but on my production machine, I have been unable to
find how I go about specifying the contents of the
mongrel_upload_progress.conf in mongrel_cluster. Does anyone know
how to
do this?

In your /etc/mongrel_cluster/whatever.yml file:


pid_file: log/mongrel.pid
servers: 3
(…)
config_script: config/mongrel_upload_progress.conf

The value of that parameter is relative to the cwd parameter in that
file (which usually points to your rails root). So put m_u_p.conf in
RAILS_ROOT/config.

-be

Fantastic, thanks Brad!

I’ll try this once traffic has died down for the night.