Archive for the 'ruby' Category

CGIAlt 1.0.0 released - re-implementation of cgi.rb

November 9th, 2008

I have released CGIAlt 1.0.0.

(homepage) http://cgialt.rubyforge.org/ (download) http://rubyforge.org/projects/cgialt/ (source) http://github.com/kwatch/cgialt/

CGIAlt is a re-implementation of ‘cgi.rb’.

Features

Compatible with ‘cgi.rb’ and CGI class Faster than ‘cgi.rb’ Available with CGIExt (which is an implementation of cgi.rb in C extension) FastCGI support Ruby 1.9 support

The complete stes to install Merb and DataMapper from source

September 25th, 2008

I just started to learn Merb and DataMapper. I installed them with RubyGems, but it raised error because Merb requires DataMapper 0.9.6 but officialy released only 0.9.5. So I decided to install them from source, and found it is hard to install them from source.

The following is the complete steps to install Merb and DataMapper from source.

## install RubyGems 1.2.0 [...]

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.

CGIExt 0.0.2 released - a re-implementation of cgi.rb in C extension

November 26th, 2007

I have released CGIExt 0.0.2.

http://rubyforge.org/projects/cgiext/

About

‘CGIExt’ is a re-implementation of ‘cgi.rb’ in C extension. It makes your web application faster.

Currently, not of all functions are implemented.

Notice: This module is still ‘alpha release’ and it’s specification may change in the future.

ActionView is Not Beautiful

October 19th, 2007

From Making Rails Better - ActionView Needs a Makeover:

the internals of ActionView are ugly.

I think so very strongly. View-layer of Ruby on Rails depends on ERB tightly. Rails provides API for other template engine, but it is too poor to make other template engine to be the same position in Rails as ERB.

30 Lines Implementation of eRuby

October 9th, 2007

eRuby is a specification to embed Ruby code (expression or statement) in any text file. There are thee implementation of eRuby:

ERB (pure Ruby, most popular and included in Ruby 1.8) eruby (implemented as C extention) Erubis (pure Ruby, very fast and extensible)

Using pattern matching, it is easy to implement eRuby. The following is a complete eRuby implementation (named TinyEruby) [...]