Shannon Fang wrote:

> Could any one give me a suggestion on this? What I am particularly 
> intersted is the readyness of eRuby in production environment 
> (especially session support etc. heard that php has session problem in 
> achievo). How about ActiveScriptRuby?

If you can wait a month or two, Ruby on Rails will probably be out. 
Rails was used to build Basecamp, a popular project management system by 
37signals. The lead developer David Heinemeier Hansson describes the 
process of building Basecamp in a two hour presentation here:

http://www.loudthinking.com/arc/000232.html

Slides from the presentation are available here:

http://www.loudthinking.com/arc/000228.html

Your needs may vary. Rails is more of a Web Application Framework than a 
templating system, so it may not be the best thing for you.

We use eRuby on mod_ruby at work and have found that it works rather 
well. It's very different from PHP, and the project isn't as mature as 
PHP, so the learning curve is initialy steeper. The payoff of being able 
to use ruby is huge. There are several ways of using eRuby. You can use 
it as a cgi app much like PHP can be used (you tell apache to pipe all 
files with a rhtml extention through eruby). Or you can use it in 
conjuction with mod_ruby. The primary disadvantage of using it with 
mod_ruby is that libraries that are "required" are loaded into a shared 
memory space. The only way to unload them (and you will need to unload 
them when ever you modify a library file) is to restart Apache. The 
shared memory space also makes it impossible to use securely in a 
"shared" server environment (an environment where multiple people have 
access to different websites running on the same Apache instance). These 
two points can make the eRuby + mod_ruby somewhat hairy to use in a 
production environment. The primary advantage to the eRuby + mod_ruby 
route is that libraries are only loaded once for a particular apache 
process, which may handle multiple requests (think speed). If the shared 
environment of mod_ruby bothers you, you should probably consider FastCGI.

eRuby is just a console application that is useful for converting a ASP 
like rhtml file into pure ruby code. eRuby will optionally pipe the 
generated code through the ruby interpreter and send back the results on 
stdout. There are many different solutions for using eRuby, and probably 
one that would meet your needs. Can you describe a little bit more about 
what you are trying to do, and then others on the list can provide 
solutions?

--
John Long
http://wiseheartdesign.com