I can get Apache2 on Ubuntu Edgy to execute ruby (.rb) files. But I’m
having
trouble getting it to recognize .rhtml files. Here is the
sites-available file.
I installed eruby and have /usr/sbin/eruby in my path. I’m trying to get
a
ruby hit counter embedded in html format files, so I think that I’d need
eruby to do that. If I try opening test.rhtml the browser wants to open
it
as text or download it. Here is test.rhtml:
eruby test
eruby test
<% print "hello world" %>
Can someone explain how to get .rhtml files working with Apache2?
I’ve done that, but can’t get it to work. Many of these links say add an ‘Action’ line to httpd.conf
but I think that you are not supposed to touch httpd.conf in apache2. I tried adding this line to
at the very and there is a line include /etc/…/* that includes
anything from i-dont-remember-its-name directory found in the
/etc/apache2 So just create a new file, or edit the ‘default’ file
which is the default server’s configuration.
/etc/apache2/apache2.conf but I get this when I try to reload apache2:
$ /etc/init.d/apache2 reload
Reloading apache 2.0 configuration… Syntax error on line
343 of /etc/apache2/apache2.conf:
Invalid command ‘Action’, perhaps mis-spelled or defined by a module not included in the server
configuration.
mod_actions - Apache HTTP Server Version 2.2 says you
need to have the mod_actions module enabled. you can enable it by
symlinking from /etc/apache2/mods.available to /etc/…/mods.enabled
(or something similar, it’s pretty obvious, you’ll figure it out
yourself)
I’ve done that, but can’t get it to work. Many of these links say add an
‘Action’ line to httpd.conf
but I think that you are not supposed to touch httpd.conf in apache2. I
tried adding this line to
/etc/apache2/apache2.conf but I get this when I try to reload apache2:
$ /etc/init.d/apache2 reload
Reloading apache 2.0 configuration…
Syntax error on line
343 of /etc/apache2/apache2.conf:
Invalid command ‘Action’, perhaps mis-spelled or defined by a module not
included in the server
configuration.
Eg, the above howto says:
in httpd.conf add:
AddType application/x-httpd-eruby .rhtml
#use your own path to eruby
Action application/x-httpd-eruby “e:/usr/local/bin/eruby.exe”
(I used /usr/bin/eruby)
I’m using Ubuntu edgy linux. Does anyone know how to get eruby working
with this OS?
thanks,
Sam
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.