Eruby and DirectoryIndex

I am having issues with .htaccess and DirectoryIndex pointing at
index.rhtml. Below, I have pasted the contents of the three pertintent
files.

============ FILE CONTENTS: domain.com/ruby/.htaccess ===============
Action eruby-script /cgi-bin/eruby
AddHandler eruby-script .rhtml
DirectoryIndex index.rhtml

========== FILE CONTENTS: domain.com/ruby/cgi-bin/eruby =============
#!/bin/sh
echo “Content-type: text/html”
echo
echo “”
exec /usr/local/bin/erb /home/mathwats/public_html/ruby${REQUEST_URI}

=========== FILE CONTENTS: domain.com/ruby/index.rhtml ==============

This is index.rhtml

Time: <%= Time.now %>.
---------------------------------------------------------------------

/usr/local/bin/erb:118:in `read’: Is a directory -
/home/domain/public_html/ruby/ (Errno::EISDIR)

  • Removing the third line “DirectoiryIndex index.rhtml” from .htaccess
    and navigating to <domain.com/ruby/> gives me the “Index of /” directory
    listing page.

Any help would be very appreciated.

  • Matt

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs