Forum: Ruby on Rails embed php code in rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
408a4e38946d3aa2fca0450ec357d06a?d=identicon&s=25 Shuaib Zahda (shuaib85)
on 2009-06-04 23:50
(Received via mailing list)
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
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-06-05 00:21
(Received via mailing list)
On Thu, Jun 4, 2009 at 2:49 PM, Shuaib85 <shuaib.zahda@gmail.com> 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
9d8cb32049640350a730d9d3e638d8cb?d=identicon&s=25 istarist@gmail.com (Guest)
on 2009-06-08 00:46
(Received via mailing list)
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
Dd2d775dea75b381edb1bbf0600a0907?d=identicon&s=25 Marnen Laibow-Koser (marnen)
on 2009-06-08 02:08
istarist@gmail.com 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
marnen@marnen.org
This topic is locked and can not be replied to.