rails mongrel

How do I use Mongrel with the Rails tools?

Question: 

We're moving from using Webrick to Mongrel for serving our Rails apps. How do we get Komodo to move along with us?

Answer: 

The problem isn't getting Komodo to move along, but stopping it when necessary.

I only tested this on Windows, please reply and correct me if behavior is different on Linux or OS X. But on Windows, I installed the mongrel and mongrel_service gems,
switched to Komodo, and my existing rails projects automatically started using Mongrel
for running and debugging servers.

The problem at this point is that debugging doesn't work with Mongrel, and I've logged this at http://bugs.activestate.com/show_bug.cgi?id=73405

I've checked in a fix to handle this, but it didn't make the latest 4.2.1 release. The workaround is to modify the 'debug rails app' macro in the Rails project to add "webrick" after "script/server", as in this line:

        var cmd = (obj.ruby + ' -I "'
                   + rbpath
                   + '" -r rdbgp.rb script/server webrick');
        as_rails_macros.runCommand(editor, cmd, options);

If you don't want to make this change more than once, unzip the
Ruby on Rails.kpz file, make this change in the package.kpf file (this
line appears twice, make sure you change it only for the
"debug rails app" macro, not the "run server" macro. Zip package.kpf
back into "Ruby on Rails.kpz" (it has no other files), and new projects
should behave correctly.

I only tested this with Rails versions past 1.2. YMMV if you're using
an older version.