Parragh Szabolcs wrote:
> Hello,
> sorry for the repost, but still have no solution, but really would 
> like to find it:) So could someone please help me a bit -- can I not 
> extend classes with new methods in mod_ruby?
>
> -- 
>
> I'm trying some code with mod_ruby where I make a postgresql 
> connection. The following works fine:
>
<snip code>
> The latter code works from command line, making the same output as the 
> first one, however, with mode_ruby I get the following error in apache 
> error.log:
>
> [Sat Nov 04 13:28:08 2006] [error] mod_ruby: error in ruby
> [Sat Nov 04 13:28:08 2006] [error] mod_ruby: 
> /var/www/ruby/e1b.rb:20:in `with_db': undefined method `connect' for 
> #<Module:0xb6fb45b4>::PGconn (NoMethodError)
>
> Could someone please help me out with this? It might be an obvious 
> fault in my code, but I cannot figure it out.
>
> Thanks:
> Szab

Try restarting Apache. If you modify a library mod_ruby has already 
loaded, it won't be reloaded until Apache is restarted.

-Justin