» ruby-web «

ruby-web provides a web-friendly ruby environment.

ruby-web is a foundation, not a framework. It is a simple, solid platform for the development of pages, applications, and frameworks.

 

Roadmap

In 2002, I became frustrated with how cgi.rb handled multiple parameters, and began a fork of cgi. Since then, I have been developing ruby-web as a solid and simple platform for running ruby on a web server.

  • Done! - Create a beta release by RubyConf (October 2005). Beta release must include installers for mac and windows.
  • Done! - Implement output buffering like the php api
  • Done! - Write manual
  • Implement "share nothing" execution path
  • Merge mod_ruby / fastcgi / webrick code bases into one codebase with consistent request scopes.
  • Make a formal Request For Comment to ruby-talk, and incorporate feedback from community
  • Freeze the basic Web APIs
  • Integrate into standard ruby distributions, or integrate with mod_ruby and fastcgi projects.

I'll be chatting about the development progress over on NARF.

return to top

Download

ruby-web mostly depends on Ruby 1.8.x. On Windows, the ruby-web package will provide a pre-compiled ruby-web.exe binary that is linked against the Windows One-Click Installer.

Installers for ruby web are available from Rubyforge.

If there is not an appropriate installer, use the latest "ruby-web-x.x.x.tgz" file. Extract the archive with Winzip / Stuffit / "tar -xvzf ruby-web-x.x.x.tgz". From the command line, execute these commands:

  ruby install.rb config
  ruby install.rb setup
  ruby install.rb install

This will compile and install the ruby-web interpreter. Instructions for your webserver are available in the manual

return to top

Development

The ruby-web mailing list is:

narf-lib-devel@lists.sourceforge.net
Archives and Subscribe / Unsubscribe

The ruby-web code is in this subversion repository:

http://svn.narf-lib.org/svn/patsplat/ruby-web/trunk/

ruby-web uses rake to manage build tasks. Here are some common tasks:

    rake test           (tests main narf tests)
    rake testwiki       (tests built-in wiki app)
    rake testexamples   (tests examples)
    rake macpkg         (build installer .pkg on MacOS X)
    rake winpkg         (build installer .exe on Windows using NSIS)

To test installation, save this short script as test.rb:

    #!/usr/bin/ruby-web
    Web::info

And run this command, substituting the appropriate url to test.rb:

    ruby build.rb testinstall http://localhost/test.rb

Patrick May is the maintainer of ruby-web.

return to top

Documentation

All above, in single HTML file.

Credit

ruby-web was formerly the NARF web framework.

NARF was written by Tom Clarke and Patrick May, based on cgi.rb written by Wakou Aoyama. It maked significant use of ruby-htmltools, written by Ned Konz. Also, Keunwoo Lee patched #read_multipart to be cleaner.

ruby-web contains code from the following projects, and I am in their debt:

ruby
A beautiful programming language.
http://www.ruby-lang.org
mod_ruby
Mod Ruby is an excellent option for scalable ruby on the apache web server.
http://modruby.net/
fcgi
FastCGI is another excellant option for scaling ruby.
http://sugi.nemui.org/prod/ruby-fcgi/
ruby-htmltools
This is a Ruby library for building trees representing HTML structure.
http://bike-nomad.com/ruby
sgml-parser
The html-parser package is a variant language implementation of the Python's SGML parser (sgmllib.py), HTML parser (htmllib.py) and Formatter (formatter.py).
http://www.jin.gr.jp/%7Enahi/Ruby/html-parser/README.html
webunit
WebUnit is Ruby API for testing html/cgi without browser, and is idealy suited for automated unit testing of web sites when combined with a Ruby unit test framework such as RubyUnit. It was designed and implemented by Masaki Suketa.
http://www.xpenguin.biz/download/webunit/index-en.html
php
PHP has been a strong influence on ruby-web. The installation section of the ruby-web documentation was initially forked from the excellant work of the PHP Documentation Group

The background of this site uses a photo of a spider posted on flickr.com by JS1975.

return to top