mod_ruby, ebury and module problem

Arnaud LACOMBE <[email protected]> Wed, 29 Dec 2004 04:19:57 +0100
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Hello,

I encoured a strange problem this afternoon with mod_ruby. I use
mod_ruby with eruby for my CGI which require some module. When I load
many time a given page the result is not the same each time, The result
is sometimes the one given by an old version of the module.

How to reproduce:
--- mod_test.rb ---
module Test
  def Test.prt()
    print "foo","\n"
  end
end
--- end ---

--- test.rhtml ---
<%
require 'mod_test.rb'

Test.prt()
%>
--- end ---

If you change "foo" and reload many time the page, the content returned
become uncertain. Here is a part of my apache's log, the content of the
page doesn't change nor any module required by the CGI. Let's have a
look to the size (last column):

127.0.0.1 - - [28/Dec/2004:21:25:39 +0100] "GET /index.rhtml?id=in HTTP/1.0" 200 867
127.0.0.1 - - [28/Dec/2004:21:25:39 +0100] "GET /index.rhtml?id=in HTTP/1.0" 200 868
127.0.0.1 - - [28/Dec/2004:21:25:40 +0100] "GET /index.rhtml?id=in HTTP/1.0" 200 865
127.0.0.1 - - [28/Dec/2004:21:25:40 +0100] "GET /index.rhtml?id=in HTTP/1.0" 200 864
127.0.0.1 - - [28/Dec/2004:21:25:41 +0100] "GET /index.rhtml?id=in HTTP/1.0" 200 867
127.0.0.1 - - [28/Dec/2004:21:25:41 +0100] "GET /index.rhtml?id=in HTTP/1.0" 200 868

Software version:
eruby-1.0.5
mod_ruby-1.2.0
ruby-1.8.2.p2_1
apache+mod_ssl+mod_deflate-1.3.33+2.8.22
(from freebsd current port' tree)

The only one way curently to solve the problem is to restart apache ...

regards,

Arnaud LACOMBE

--