Forum: Ruby on Rails Odd issues loading classes

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Pete (Guest)
on 2006-04-27 14:23

I've just started using web services which are working brilliantly apart
from one odd little problem.

For some reason the controller runs perfectly for the first request -
and then fails for the second request citing missing definitions etc.
Basically it's reading in the class definitions initially - but for some
reason doesn't read them in for the second time.

This is true for any request - for example if I request a page and then
restart mongrel / webrick I can then make another request - so the code
itself seems to be working okay - it's just it only works for the first

I can fix the problem by putting all the code in one file - and this
does work, but it's not exactly as clean as I would really like it.

I'm just doing normal require "file/name" in the controller - which
works fine for digest/sha1 which I'm also using... should I be putting
something special in the class file I'm including?

Any help you can give me would be gratefully appreciated!!


This topic is locked and can not be replied to.