# Ruby and perl

**URL:** <https://www.ruby-forum.com/t/ruby-and-perl/97732>\
**Category:** Rails\
**Created:** [January 26, 2006, 8:16pm UTC](https://www.ruby-forum.com/t/ruby-and-perl/97732 "2006-01-26T20:16:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@Mathias](https://www.ruby-forum.com/u/Mathias)\
**Post date:** [January 26, 2006, 8:16pm UTC](https://www.ruby-forum.com/t/ruby-and-perl/97732/1 "2006-01-26T20:16:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mathias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@Mathias](https://www.ruby-forum.com/u/Mathias)\
**Post date:** [January 26, 2006, 8:26pm UTC](https://www.ruby-forum.com/t/ruby-and-perl/97732/2 "2006-01-26T20:26:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mathias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@Mathias](https://www.ruby-forum.com/u/Mathias)\
**Post date:** [January 26, 2006, 9:01pm UTC](https://www.ruby-forum.com/t/ruby-and-perl/97732/3 "2006-01-26T21:01:52Z")

</div>

Can cgi output not be included using SSIs?

---

<div class="post-metadata">

**Author:** ![Mathias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@Mathias](https://www.ruby-forum.com/u/Mathias)\
**Post date:** [January 26, 2006, 10:19pm UTC](https://www.ruby-forum.com/t/ruby-and-perl/97732/4 "2006-01-26T22:19:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mathias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@Mathias](https://www.ruby-forum.com/u/Mathias)\
**Post date:** [January 26, 2006, 11:42pm UTC](https://www.ruby-forum.com/t/ruby-and-perl/97732/5 "2006-01-26T23:42:11Z")

</div>

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

> **[yakimaherald.com | Yakima, Washington - We Tell Your Stories](https://www.yakimaherald.com/)**

509-577-7732  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Mathias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@Mathias](https://www.ruby-forum.com/u/Mathias)\
**Post date:** [January 27, 2006, 1:03am UTC](https://www.ruby-forum.com/t/ruby-and-perl/97732/6 "2006-01-27T01:03:41Z")

</div>

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.
