Embed a Rails app within another?

I’m looking for a solution where I could load and render pages from one
Rails application within another. I’m looking through the Rails code
right now to see if this would even be remotely possible. Does anyone
have any ideas?

I know the obvious answer would be to proxy the app via Net::HTTP, but
this is undesirable because:

  • I don’t always want to depend on having the “sub” app live on an HTTP
    port (even if firewalled, I would have the overhead of keeping 2 apps
    up).
  • I want as few external dependencies as possible.

It would also be nice if the “sub” app required as few modifications as
possible, to allow drop-in of existing applications.

I’ve got the metaprogramming bug now that I’ve been reading Camping. I
can’t help but think there would be a simple way to partition off the
“sub” application, but I have no ideas.

Brad

On 6/22/06, Brad E. [email protected] wrote:

I’m looking for a solution where I could load and render pages from one
Rails application within another. I’m looking through the Rails code
right now to see if this would even be remotely possible. Does anyone
have any ideas?

you could render_component and have that grab the info from the other
app via web services.

kate rhodes wrote:

On 6/22/06, Brad E. removed[email protected] wrote:

I’m looking for a solution where I could load and render pages from one
Rails application within another. I’m looking through the Rails code
right now to see if this would even be remotely possible. Does anyone
have any ideas?

you could render_component and have that grab the info from the other
app via web services.

Yeah, I was thinking about that. I think I might just write a few
plugins to proxy loading of Rails apps (through Dispatcher) over DRb.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs