Why can't I use eruby without Rails ? I don't like Rails, but it seems eruby has not been used without Rails for a decade (If I refer on the dates of the lasts questions about eruby on Stack Overflow).
Here are the lines that I added to my Apache configuration to handle .erb scripts :
AddHandler application/x-httpd-erb .erb
Action application/x-httpd-erb "/cgi-bin/erb-cgi.rb"
When I try to load a simple test page (located on myserver.fr/test.erb), I get the following error :
The requested URL /cgi-bin/erb-cgi.rb/test.erb was not found on this server.
It seems like Apache try to open "/cgi-bin/erb-cgi.rb/test.erb" instead of running /cgi-bin/erb-cgi.rb with test.erb as a parameter (what should be the normal behavior of the Action directive)
I don't detail here the /cgi-bin/erb-cgi.rb script, the server doesn't even try to open it. It was working for the whole world 10 year ago, I don't think I'm doing something wrong... Am I ? (Of course I am)
And yes, I'm french, so there is a nonzero probability that my English is bad. Thanks for your help!
Not exactly what you asked for, but if you want easy templating in Ruby without Rails, you may want to have a look at Sinatra, a very lightweight framework build in Ruby.
Sinatra can be run in a single command, manages routes and templates, and that's about it.