HoW to add ruby on rails pages in a PHP application

Hi all

I am using a CMM developed in PHP and I would like to know how ease it
is to add RoR pages in this type of project and also how to add RoR
functions inside a PHP page.

Please advise!

Hi all

I am using a CMM developed in PHP and I would like to know how ease it
is to add RoR pages in this type of project and also how to add RoR
functions inside a PHP page.

Well if you wanted to have some rails pages alongside some php pages
then it shouldn't be too difficult to setup apache/nginx to send
requests for some paths to one backend and requests for other paths to
a different one.
Beyond that it gets complicated, for example the rails session is a
serialized ruby object which you'll have difficulty reading from php
land or your php code may have assumptions about how a database schema
should be laid out that conflicts with what active record expects.
Actually embedding rails stuff within a php page doesn't sound
possible (short of cheat by using an iframe, a separate ajax request
or an internally generated http request).

Fred

Pepe Sanchez wrote:

Hi all

I am using a CMM developed in PHP and I would like to know how ease it
is to add RoR pages in this type of project and also how to add RoR
functions inside a PHP page.

You need a Ruby interpreter to run Rails. You need a PHP interpreter to
run PHP. What you're asking for is largely impossible unless someone
has managed to come up with a clever interface between JRuby and
Quercus.

Please advise!

Best,

Hi all

I am using a CMM developed in PHP and I would like to know how ease it

is to add RoR pages in this type of project and also how to add RoR

functions inside a PHP page.

And really, why would you want to inflict such self torture as running two frameworks? I love Rails but that just sounds like no fun. Maybe you are much smarter – or a thrill seeker! but for me one framework is enough at a time :slight_smile:

We have done it for couple of years, while transitioning one
application from php to rails, but in a limited way.
Eg we didn't share the rails session with php, but only read session
information one way from php to rails.
Also you will need some way to update the php session so it doesn't
time out while you are browsing on rails pages.
We did no embed rails content into php pages...
If you really want to go this way let me know and I lookup some of our
old setup.

Best, Daniel