Embed php code in rails

Hi there

There are some code pieces that are available in php like currency
rates, and weather status, etc. Is there a way that I can use those
php code within rails code in the view. or is there a good rails
plugin for that purpose

thanks

On Thu, Jun 4, 2009 at 2:49 PM, Shuaib85 [email protected] wrote:

Hi there

There are some code pieces that are available in php like currency
rates, and weather status, etc. Is there a way that I can use those
php code within rails code in the view. or is there a good rails
plugin for that purpose

thanks

Well, if you have truly looked for similar within the Ruby gems and
plugin
repositories and cannot find an equivalent, I would recommend adding
the functionality to existing gems/plugins or creating new ones. From
my
experience, it was simply easier to do it this way unless the PHP and
Ruby sides code interactions were isolated.

For example, I had to integrate a Word Press blog into a Rails
application.

This worked great because I just dropped the blog into the public part
of
the Rails
site and I was off to the races. However, this didn’t work so well when
I
needed
to integrate a Rails application with a bank’s billing interface that
was in
PHP.
It simply felt wrong but the client wanted it ASAP and I ended up
capturing
the
users input on the Rails side and submitting it to a PHP confirmation
page
for later
submission to the bank.

In short, if you can find a good isolation point between the two
languages,
I would
use that at a means of integrating the two if you do not have time to do
it
all in
Ruby.

Good luck,

-Conrad

Conrad, I’m trying to drop Wordpress into the public folder of my
rails project, just as you said.

Did you have any trouble with the index.php files? Some error is
causing them to return blank pages.

It’s frustrating, because if I manually type in
www.satslayer/blog/wp-admin/index.php
I can see my dashboard, but
I cannot get www.satslayer/blog/index.php to work for the life of me.

When I make the wordpress site my root, it works. So something in
rails is causing a php error.

Any idea what’s going on? Oh, and where are the php error log files
located?

Thank you,

Frank

[email protected] wrote:
[…]

Oh, and where are the php error log files
located?

PHP generally puts its errors into the Apache server’s error log, if I
remember correctly.

Thank you,

Frank

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]