Forum: Ruby apache and eruby

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.
Fa0d14a176f060c96eef797fa48e6bcc?d=identicon&s=25 unknown (Guest)
on 2005-12-31 12:30
(Received via mailing list)
i'd like to use eruby with mod_ruby

i've installed bothe of them and add some config to Apache (see below)

i've tested my config within folder /path/to/www/ruby
with a cgi script named "test" , works ok

and also within folder /path/to/www
with the same cgi script named "test.rbx" => works well !


then, i want to test an "index.rhtml" file within /path/to/www
no error message, however the navigator (FireFox) want me to download
the file "index.rhtml" instead of visualizing it !


what did i miss here ?
a special configuration of mod_ruby to allow eruby ?


LoadModule ruby_module /usr/libexec/httpd/mod_ruby.so


<IfDefine !APACHE2>
        AddModule mod_ruby.c
</IfDefine>

<IfModule mod_ruby.c>
  RubyRequire apache/ruby-run

  # Excute files under /ruby as Ruby scripts
  <Directory /Users/yvon/Sites/ruby>
    Options ExecCGI
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </Directory>

  # Execute *.rbx files as Ruby scripts
  <Files *.rbx>
    Options ExecCGI
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </Files>
</IfModule>


<IfModule mod_ruby.c>
  RubyRequire apache/eruby-run

  AddType application/x-httpd-eruby .rhtml
  Action application/x-httpd-eruby eruby

  <IfModule mod_dir.c>
      DirectoryIndex index.rhtml
  </IfModule>

  # Handle *.rhtml files as eRuby files
  <Files *.rhtml>
     SetHandler ruby-object
     RubyHandler Apache::ERubyRun.instance
   </Files>
</IfModule>
Fa0d14a176f060c96eef797fa48e6bcc?d=identicon&s=25 unknown (Guest)
on 2005-12-31 12:57
(Received via mailing list)
Une bévue <pere.noel@laponie.com> wrote:

> then, i want to test an "index.rhtml" file within /path/to/www
> no error message, however the navigator (FireFox) want me to download
> the file "index.rhtml" instead of visualizing it !

i had to comment the lines :
 # AddType application/x-httpd-eruby .rhtml
 # Action application/x-httpd-eruby eruby
This topic is locked and can not be replied to.