Forum: Ruby on Rails Odd issues loading classes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ef31136ad29b9ce06c9f718109a584cc?d=identicon&s=25 Pete (Guest)
on 2006-04-27 12:23
Hi,

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
time.

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!!


Cheers,


Pete
This topic is locked and can not be replied to.