Forum: Ruby Can't get Apache2 to i interpret my ruby file

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.
80e8c95efd94e1850838d27024ea1ac1?d=identicon&s=25 laredotornado@zipmail.com (Guest)
on 2007-02-01 05:55
(Received via mailing list)
Hi,

I have Apache 2.2 installed on my Fedora Core 5 Linux machine.  I
created this file, "test.rb" at my public document root

#!/usr/local/bin/ruby
print "Content-type: text/html\r\n\r\n"
print "<html><body>Hello everybody!!!!</body></html>\r\n"

and when i visit http://mydomain.com/test.rb, the output is

#!/usr/local/bin/ruby
print "Content-type: text/html\r\n\r\n"
print "<html><body>Hello SAm and Lisa!!!!</body></html>\r\n"

That's right, it's just the same file.  So my question is, what
directives to I need to add to my "httpd.conf" file to make this file
interpret?  I am surprised by how little documentation there is on how
to do this.

Thanks, - Dave
1c1e3bdfe006a22214102fcd6434a012?d=identicon&s=25 Daniel Sheppard (Guest)
on 2007-02-01 07:19
(Received via mailing list)
258b0d1886b55b90ef339c1caf69a41b?d=identicon&s=25 Alin Popa (chucky)
on 2007-02-01 07:21
laredotornado@zipmail.com wrote:
> Hi,
>
> I have Apache 2.2 installed on my Fedora Core 5 Linux machine.  I
> created this file, "test.rb" at my public document root
>
> #!/usr/local/bin/ruby
> print "Content-type: text/html\r\n\r\n"
> print "<html><body>Hello everybody!!!!</body></html>\r\n"
>
> and when i visit http://mydomain.com/test.rb, the output is
>
> #!/usr/local/bin/ruby
> print "Content-type: text/html\r\n\r\n"
> print "<html><body>Hello SAm and Lisa!!!!</body></html>\r\n"
>
> That's right, it's just the same file.  So my question is, what
> directives to I need to add to my "httpd.conf" file to make this file
> interpret?  I am surprised by how little documentation there is on how
> to do this.
>
> Thanks, - Dave

Hi Dave,

Please take a look at: http://wiki.modruby.net/en/?InstallGuide
It was the only straight installation manual that I found out there and
it was a great help.

Note: pay attention on which version of Apache are you going to make the
installation (Apache or Apache2).

Best regards,
Alin.
258b0d1886b55b90ef339c1caf69a41b?d=identicon&s=25 Alin Popa (chucky)
on 2007-02-01 07:24
Alin Popa wrote:
> laredotornado@zipmail.com wrote:
>> Hi,
>>
>> I have Apache 2.2 installed on my Fedora Core 5 Linux machine.  I
>> created this file, "test.rb" at my public document root
>>
>> #!/usr/local/bin/ruby
>> print "Content-type: text/html\r\n\r\n"
>> print "<html><body>Hello everybody!!!!</body></html>\r\n"
>>
>> and when i visit http://mydomain.com/test.rb, the output is
>>
>> #!/usr/local/bin/ruby
>> print "Content-type: text/html\r\n\r\n"
>> print "<html><body>Hello SAm and Lisa!!!!</body></html>\r\n"
>>
>> That's right, it's just the same file.  So my question is, what
>> directives to I need to add to my "httpd.conf" file to make this file
>> interpret?  I am surprised by how little documentation there is on how
>> to do this.
>>
>> Thanks, - Dave
>
> Hi Dave,
>
> Please take a look at: http://wiki.modruby.net/en/?InstallGuide
> It was the only straight installation manual that I found out there and
> it was a great help.
>
> Note: pay attention on which version of Apache are you going to make the
> installation (Apache or Apache2).
>
> Best regards,
> Alin.

Sorry, I forgot one more thing:
The installation above is about linux (or this is where it helped me)
For win32 install, check that: http://www.hiveminds.co.uk/node/3094

Alin.
Ac0085dae0703db56ad7f8cb9e1798ba?d=identicon&s=25 unknown (Guest)
on 2007-02-01 12:05
(Received via mailing list)
Daniel Sheppard wrote:
> http://httpd.apache.org/docs/1.3/howto/cgi.html


Better use this one:
http://httpd.apache.org/docs/2.0/howto/cgi.html


--
Over by the window lie the raiment and the weapons
That we need to take into this world today
Armoured by opinion, with statistic and schoolboy's charm
We take our place amongst the rank and file

Skyclad - A Survival Campaign
This topic is locked and can not be replied to.