Ruby/Asp

Ruby-ASP provides an Active Server Pages port to the Apache Web Server with Ruby scripting only, and enables developing of dynamic web applications with session management and embedded Ruby code.

CGI

Ruby/ASP "CGI mode" has been developped for "mod_ruby-less" architectures !
[top]

Standalone CGI Mode, without mod_ruby

As of version 0.2.8, Ruby/ASP scripts may be run as standalone CGI scripts without mod_ruby being loaded into Apache. Work to date has been done with mod_cgi scripts under Apache on a Unix and Win32 platforms.
[top]

Install

First install Ruby/Asp, see Install section for more details. Then copy the ruby-asp.rb script in your cgi-bin directory :
$ cp /usr/bin/ruby-asp.rb /path/to/cgi-bin/ruby-asp.cgi
or create a symblink :
$ ln -s /usr/bin/ruby-asp.rb /path/to/cgi-bin/ruby-asp.cgi

Add these lines to httpd.conf or in a .htaccess file
AddType application/x-httpd-asp-cgi .asp
Action application/x-httpd-asp-cgi /cgi-bin/ruby-asp.cgi

The ruby-asp.rb script is a cgi wrapper that sets up the Ruby/ASP environment in lieu of the normal mod_ruby handler request. Because there is no Apache::Table object available under mod_cgi, the ruby-asp.rb script will load a asp.conf file that may define a hash Config of data.

So, a trivial asp.conf file might look like:
Config = {
  "StateDir"       => "/tmp/ruby_asp",
  "Global"         => "global-asa",
  "MailHost"       => "smtp"
  "MailPort"       => "25"
  "MailErrorsFrom" => "www-error@webtime-project.net"
  "MailErrorsTo"   => "greg@webtime-project.net"
  "ErrorFile"      => "error.html"
}

See Install section for more details on configuration.
[top]

Style : [ mozilla | blue | print | basic ]

Valid HTML 4.01! Valid CSS! mod_ruby

Copyright © 2003, Grégoire Lejeune.