Hi, $ndy?

> From: Andrew Hunt [mailto:andy / Toolshed.Com]
> Sent: Wednesday, May 10, 2000 1:05 PM

> 	>> I'm looking for a few more short examples of win32ole.  Is anyone
> 	>> using it for a serious (or semi-serious) application?  Does anyone
> 	>> have some short (20-30 line) examples?

I forwarded the article to ruby-list to get a serious application
 which did work with Excel.
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/22435
I would like to thank to Mr. Koyama Hideo who did it as soon as I requested.

But I think it may be a little long to use as a example.
Also it contains Japanese multibyte chars and Japanese style variable name.
I will wait other example for a few days.

> 	>> Also, the same question for eRuby - it seems pretty straightforward, but
> 	>> I can't find any English documentation, so more examples would be
> 	>> great.
> 	>
> 	>Not an 'eruby', but another eRuby environment (terminology?)
> 	>'erb' in http://www2a.biglobe.ne.jp/~seki/ruby/erb.html#download
> 	>has an example in its package.
> 
> Hmm. Is either more "official" than the other? (more widely used,
> more mature, better supported, etc.)?

I think both 'eruby' and 'erb' are enough mature and well supported by the authors.
Unfortunaely I do not use eruby now, 'eruby' seems to be more widly used than 'erb'.

Different from its early versions, 'eruby' now are packed with 'mod_ruby'.
From this point of view, IMHO,
 'eruby' might be more mature than 'erb' using with 'mod_ruby'.

Why I do not use 'eruby' but 'erb'?

'erb' is a Ruby library thus is easy to embed in Ruby application.
'erb' offers lightweight library named ERbLight which compiles only '<%= %>'.

Using eRuby in serious application, it is very hard and troublesome
 to handle errors and exceptions in embedded code, I think.  For example...

  <html>
  <body>
  <h1>You can purchase on-line our products below</h1>
  <%
  begin
    File.readlines( "productfile" ).each do |line|
      ...
    end
  rescue
    # !!! I want to show customers Error page which does not have "You can purchase..." !!!
  end  
  %>
  </body>

I dislike too complex code in eRuby file.
Embedded code should be extremely simple such as one or two sentence(s) I think,
  so I use only '<%= %>' style.  ERbLight does perfect job for it.
 
--
NaHi, nakahiro, a.k.a. NAKAMURA, Hiroshi
http://www.sarion.com  Sarion Systems Research
I am sorry for my poor English.

// Actually, with 'eruby', you can do redirect controlling HTTP header manually.

  <%
  $NOHEADER = true
  begin
    raise
  rescue
    # clear output
    $>.cancel

    # noheader mode
    $NOHEADER = true

    # redirection
    print "Location: #{uri_for_error}\n\n"
  end
  %>

This example is from http://kahori.com/ruby/earrings/earrings4.html.
Thanks to Ms. TAKEUCHi Kahori.