For version eruby-1.0.5:
SSH into your box.
mkdir ~/eruby
cd ~/eruby
wget http://www.modruby.net/archive/eruby-1.0.5.tar.gz
tar -xzf eruby-1.0.5.tar.gz
cd eruby-1.0.5
./configure.rb
make
cp eruby ~/public_html/cgi-bin/eruby
cd ~/public_html/cgi-bin
chmod 755 eruby
then add these 2 lines to your .htaccess
AddType application/x-httpd-eruby .rhtml
Action application/x-httpd-eruby /cgi-bin/eruby
Now .rhtml (embedded ruby files) will work. I also add the .rb/.rbx extensions to the AddType.
Example: (helloworld.rhtml)
<%
title = "eRuby test"
body = "hello world (from Ruby)"
%>
<html>
<head>
<title>
<%= title %>
</title>
</head>
<body>
<%= body %>
</body>
</html>
- 0 Users Found This Useful