From: Mitul Ti Date: 2011-01-27T06:40:34+09:00 Subject: rhtml and apache trouble I am trying to run embedded ruby inside rhtml. $cat test.rhtml <% print "Content-type: text/html\n\n" %> Testing <% foo = "Ruby"; print "#{foo}!" %> It works fine from the command line: $eruby test.rhtml Content-type: text/html Testing Ruby! But inside my apache setup it doesn't work. Accessing "http://localhost/cgi-bin/test.rhtml" gives following error: "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log." Error log says: [Wed Jan 26 13:21:53 2011] [error] [client ::1] (8)Exec format error: exec of 'Dir/cgi-bin/test.rhtml' failed [Wed Jan 26 13:21:53 2011] [error] [client ::1] Premature end of script headers: test.rhtml I have copied "eruby" executable to "Dir/cgi-bin/" directory and configured apache (2.2) as follows: AddType application/x-httpd-eruby .rhtml Action application/x-httpd-eruby Dir/cgi-bin/eruby Any ideas? Thanks! -- Posted via http://www.ruby-forum.com/.