I am trying to run inline ruby inside rhtml.
$cat test.rhtml
<html>
<body>
Testing <% foo = "Ruby"; print "#{foo}!" %>
</body>
</html>
It works fine from the command line:
$eruby test.rhtml
<html>
<body>
Testing Ruby!
</body>
</html>
But inside my apache installation this does not work.
Access to "http: //localhost/cgi-bin/test.rhtml" gives the following error:
"Internal Server Error
The server detected an internal error or incorrect configuration and was unable to fulfill your request.
Contact the server administrator you@example.com and tell them about the time the error occurred and what you could do to cause the error.
Additional information about this error may be available in the server error log. "
The error log says:
[Sat Jan 22 17:56:07 2011] [error] [client:: 1] (8) Exec: exec 'Dir/cgi-bin/test.rhtml'
[Sat Jan 22 17:56:07 2011] [error] [client:: 1] script : test.rhtml
"eruby" "Dir/cgi-bin/" apache (2.2) :
AddType application/x-httpd-eruby .rhtml
Action application/x-httpd-eruby Dir/cgi-bin/eruby
? !