I've been trying to use eruby lately for my website. I installed a
userspace copy of Ruby 1.8.2 and the latest eruby, following the
instructions as per http://tinyurl.com/6mkeb
So I can get Ruby scripts working fine (.rbx files) and if I add the
shebang to .rhtml files and make them executable I can get them to work
too. But plain .rhtml files end up confusing the server. I get the
following error message:
File does not exist: /home/albert/public_html/cgi/eruby/GetEnv.rhtml
where GetEnv.rhtml is sitting in public_html and eruby is the exectuable.
It's almost as if Apache can't figure out that eruby is the executable.
Manually running eruby shows no problems. I think this is an Apache
configuration thing, and I really hope it can be solved via .htaccess
instead of me going through the hassle of begging my host to change his
httpd.conf. Any ideas?
This is probably a silly question, but is GetEnv.rhtml sitting in
public_html/ as described above, or in public_html/cgi/eruby/? If
that's the case, you may need a .htaccess file in public_html/ with
the requisite eruby directives, because .htaccess only affects the
current directory and those below it.
Anyway... this may be a mime-type problem. Looking at the link you
gave, the processing of .rhtml files depends on Apache being able to
correctly identify them as mime-type application/x-httpd-eruby. You
could add that in your .htaccess file using the AddType directive, if
your server admin allows it.
-mike
···
On Tue, 11 Jan 2005 13:01:20 +0900, Albert <albert@moetry.nospam.org> wrote:
Hello all.
I've been trying to use eruby lately for my website. I installed a
userspace copy of Ruby 1.8.2 and the latest eruby, following the
instructions as per http://tinyurl.com/6mkeb
So I can get Ruby scripts working fine (.rbx files) and if I add the
shebang to .rhtml files and make them executable I can get them to work
too. But plain .rhtml files end up confusing the server. I get the
following error message:
File does not exist: /home/albert/public_html/cgi/eruby/GetEnv.rhtml
where GetEnv.rhtml is sitting in public_html and eruby is the exectuable.
It's almost as if Apache can't figure out that eruby is the executable.
Manually running eruby shows no problems. I think this is an Apache
configuration thing, and I really hope it can be solved via .htaccess
instead of me going through the hassle of begging my host to change his
httpd.conf. Any ideas?
I've been trying to use eruby lately for my website. I installed a
userspace copy of Ruby 1.8.2 and the latest eruby, following the
instructions as per http://tinyurl.com/6mkeb
This is a post from 2002 - I think it's quite dated...
So I can get Ruby scripts working fine (.rbx files) and if I add the
shebang to .rhtml files and make them executable I can get them to work
too. But plain .rhtml files end up confusing the server. I get the
following error message:
File does not exist: /home/albert/public_html/cgi/eruby/GetEnv.rhtml
It sounds like it's trying to execute the script via a cgi named
eruby, which doesn't exist. This shouldn't happen. There's an Apache
misconfiguration here somewhere.
where GetEnv.rhtml is sitting in public_html and eruby is the exectuable.
It's almost as if Apache can't figure out that eruby is the executable.
eruby should not be called on as an executable (it's a handler within mod_ruby)
Manually running eruby shows no problems. I think this is an Apache
configuration thing, and I really hope it can be solved via .htaccess
instead of me going through the hassle of begging my host to change his
httpd.conf. Any ideas?
Albert <albert@moetry.nospam.org> wrote in
news:Xns95DAEA0379816albertmoetryorg@140.99.99.130:
Hello all.
I've been trying to use eruby lately for my website. I installed a
userspace copy of Ruby 1.8.2 and the latest eruby, following the
instructions as per http://tinyurl.com/6mkeb
...
Just a quick followup, after reading the Apache docs for awhile I tried
renaming eruby to eruby.cgi and it seems to have done the trick. Go
figure. Thanks for the responses everyone.