Forum: Ruby How to install and test eruby on tiger

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.
E29eaefee1709918198c8a4f55c42667?d=identicon&s=25 Anne G (Guest)
on 2006-04-25 03:33
(Received via mailing list)
I followed the english instructions of
http://mujblog.info/gransy17/software/apache--eruby
since it seemed recent.
I do have an eruby in /usr/bin, which I did not have before

I changed /private/etc/httpd.conf
adding the two lines
AddType application/x-httpd-eruby .rhtml
Action application/x-httpd-eruby /cgi-bin/eruby

that seems the same as in the ruby book

I also added index.rhtml to the directory list.

I put the test file in
/library/webserver/CGI-Executables/basic
and test it with
http://127.0.0.1/cgi-bin/basic/erubytest.rhtml

it seems to find the file, but gives me an  error
in error.log
[Mon Apr 24 21:17:16 2006] [error] (8)Exec format error:
exec of
/Library/WebServer/CGI-Executables/basic/erubytest.rhtml
failed

this is what I am trying to test with, in erubytest.rhtml
with chmod 755 on the file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<body>
<h1>eruby test</h1>
<p>
current time: <%= Time.now %>
</p>
</body>
</html>

from
http://svn.modruby.net/repos/eruby/trunk/examples/test.rhtml
I took out the reference to foo, and cut it a bit shorter.

I have a ruby cgi file which works from that directory

any suggestions?

Anne G.
This topic is locked and can not be replied to.