Archive for December, 2007

Mod_fcgi is Great

December 30th, 2007

Mod_fcgi is an alternative apache2 module of mod_fastcgi. I have installed mod_fcgi and found it great.

Benefit of mod_fcgi:

Process management is sophisticated.

No FastCGI process is spawned at first. Prcoess is spawned only when request is comed. Number of processes is increased automatically according to the load of server.

As fast as mod_fastcgi. No need to install FastCGI Development Kit.

It’s [...]

Tips to Debug Ruby CGI script

December 24th, 2007

In Ruby CGI script, error messages are printed only in log file. If you got any errors, you must look up log file to know what and where error raised. This is not difficult, but a bother thing.

The following script named ‘cgi_exception.rb’ is a tiny script to display exception in browser like PHP. If you [...]

Patch for ruby-fcgi

December 16th, 2007

Current Ruby FastCGI module doesn’t allow you to specify port number or unix domain socket file path of connection.

I have create a patch to enable to specify port number or socket file path. If you have applied the patch, the following code is available.

require 'rubygems' require 'fcgi' arg = "/tmp/mysocket.sock" # or arg = 8001 [...]

CGIAlt 0.0.2 is released

December 12th, 2007

I have released CGIAlt 0.0.2.

http://cgialt.rubyforge.org/

CGIAlt is an alternative library of standard ‘cgi.rb’. It is faster than and compatible with ‘cgi.rb’ and CGI class.

In this release, CGIAlt supports FastCGI. You should require ‘cgialt/fcgi’ instead of ‘fcgi’ if you want to use CGIAlt with FastCGI.

How to Install Rubinius

December 5th, 2007

Rubinius is an alternative implementation of Ruby.

Install Git Copy Rubinius repository Build by ‘rake build’ Install by ‘rake install’ Invoke Rubinius by ‘rbx’

Ruby-prof is great

December 1st, 2007

I have installed ruby-prof. Ruby-prof can generate pretty report of propfiling (example). Great.