From: "sean.swolfe@..." Date: 2006-01-09T18:03:54+09:00 Subject: DRb troubles, cannot Marshal or proxy objects successfully. I've been trying for hours trying ot get my DRb session store working. I can get it to work in a gerneralized way, but I need to add some validation to check the state of the session data, and keep track of it, in case I need to invalidate the session data, so a user doen't track with stale data on a website. My first tries, I noticed that the objects that were coming in to my Drb server were not being unmarshalled, This was fine if i just wanted to store the data, but I needed to see values inside. So I tried getting marshaling working. First i tried making class stubs for the classes that were coming over, but I would get : usr/lib/ruby/1.8/drb/drb.rb:582:in `load':dump format error (user class) So then I tried proxying the code, but the first time it comes across, I get: /usr/lib/ruby/1.8/drb/drb.rb:1094: `0x114475a is recycled object' (RangeError) I've been searching all over the net and have only found some very vague information. I hope someone can help me out here... Here's my code. ======drb_server.rb============ #!/usr/bin/env ruby -w # This is a session storage daemon, basically just a hash, # which is enabled for DRb access. But it has timestamping, # for expiration and a way for setting if the information is invalid. require 'drb/drb' session_hash = Hash.new session_hash.instance_eval { @mutex = Mutex.new; @user_hash = Hash.new } TIMEOUT = 15 * 60 # 15 minute Timeout #uncomment these classes if you want to marshal #class User #end # #class ActionController #end # #class ActionController::Flash #end # #class ActionController::Flash::FlashHash #end class <