Running multiple mod_ruby applications on the same Apache

Is there anyway to bind a mod_ruby space to a single virtual host in
Apache? I’m running into problems when trying to run two similar
mod_ruby applications on the same server. Since they frequently share
the same Apache process, they both try to extend the same classes and
such with conflicting advice.

Or is it easier to just setup another Apache on another port?

···


/ David Heinemeier Hansson

I would just set up another Apache on another port and then use mod_proxy to
get your virtual host to point to it.

– Samuel

David Heinemeier Hansson david@loudthinking.com writes:

···

Is there anyway to bind a mod_ruby space to a single virtual host in
Apache? I’m running into problems when trying to run two similar
mod_ruby applications on the same server. Since they frequently share
the same Apache process, they both try to extend the same classes and
such with conflicting advice.

Or is it easier to just setup another Apache on another port?

/ David Heinemeier Hansson

This is a limitation of the current Ruby interpreter. All of the mod_ruby
code shares a single interpreter. If you can run your applications on
different ports with seperate servers, that would be one solution. If you
can somehow change the code on the applications so that they play nicely
together, that would seem to be ideal, but I bet that the scope of that is
too large for now?

I think that mod_ruby is great for doing things like writing handlers, or
for cases where you have a specialized application that you want to write
in Ruby for ease of development, but you also want to get good performance
out of. The interpreter sharing situation, though, puts me off of
mod_ruby for general application development. It’s too easy for two
random applications to walk on eachother inadvertently.

Kirk Haines

···

On Sat, 14 Feb 2004, David Heinemeier Hansson wrote:

Is there anyway to bind a mod_ruby space to a single virtual host in
Apache? I’m running into problems when trying to run two similar
mod_ruby applications on the same server. Since they frequently share
the same Apache process, they both try to extend the same classes and
such with conflicting advice.

Or is it easier to just setup another Apache on another port?