Forum: Ruby on Rails ruby and perl

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.
Mathias (Guest)
on 2006-01-26 21:16
Hello Community,

is it possible to include perl scripts into a ruby view (.rhtml)?
If yes, the structure has to be /public --> /cgi-bin like in a web
application with cgi scripts?



Best regards,
Mathias
Mikkel B. (Guest)
on 2006-01-26 21:26
Mathias wrote:
> Hello Community,
>
> is it possible to include perl scripts into a ruby view (.rhtml)?
> If yes, the structure has to be /public --> /cgi-bin like in a web
> application with cgi scripts?
>
>
>
> Best regards,
> Mathias

nope
Steve Pierce (Guest)
on 2006-01-26 22:01
(Received via mailing list)
Can cgi output not be included using SSIs?
Mathias (Guest)
on 2006-01-26 23:19
Steve Pierce wrote:
> Can cgi output not be included using SSIs?

I supposed so. I can invoke a perl script in the /cgi-bin as a link, but
an include doesn't work. Can somebody tell me why?



Mathias
Ezra Z. (Guest)
on 2006-01-27 00:42
(Received via mailing list)
On Jan 26, 2006, at 1:19 PM, Mathias wrote:

> Steve Pierce wrote:
>> Can cgi output not be included using SSIs?
>
> I supposed so. I can invoke a perl script in the /cgi-bin as a
> link, but
> an include doesn't work. Can somebody tell me why?
>
>
>
> Mathias


What kind of include are you talking about? Is this in a rails .rhtml
view or are you talking ssi? In normal ssi you have to use the exec
command instead of include to get cgi scripts to execute. But Rails
doesn't support ssi in the views does it? What you might need is to
use open-uri to grab the cgi output on localhost from a http request.

Cheers-
-Ezra Z.
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
removed_email_address@domain.invalid
Phillip H. (Guest)
on 2006-01-27 02:03
(Received via mailing list)
On 27/01/2006, at 10:19 AM, Mathias wrote:

> Steve Pierce wrote:
>> Can cgi output not be included using SSIs?
>
> I supposed so. I can invoke a perl script in the /cgi-bin as a
> link, but
> an include doesn't work. Can somebody tell me why?

Because by default Apache won't process SSI for script output. You'll
have to add an OutputFilter for dispatch.fcgi to go through mod_ssi.
If you're not using Apache you're out of luck. However:

<%= `/path/to/cgi-bin/script.pl` %>

will work.
This topic is locked and can not be replied to.