From: ale@... Date: 2001-12-04T16:41:08+09:00 Subject: [ruby-talk:27416] Re: marshalling (incompatible marshal file format) On Tue, 4 Dec 2001, Michael Neumann wrote: > Dave Thomas wrote: > > Paul Brannan writes: > > > > > I need to read some data from a Ruby script running on a remote host. > > > It was awfully convenient for me to simply marshal the data across the > > > wire, rather than writing routines to read/write the data myself. > > > > > > However, I ran into a problem when trying to read data from a host > > > running Ruby 1.6.5 to a host running 1.6.4. Is there any way to either: > > > a) force the server to use a marshal format that the client > > > understands, or > > > b) teach the client how to read the newer marshal format, even though > > > it is an older version of the interpreter? > > > > > > In this particular case, I can simply install 1.6.5 on the client, but > > > that may not be an option in the future. > > > > You could use xmarshal and transfer the stuff across in XML. I _think_ > > that'll be version independent, although I've never tried it. > > > > http://www.goto.info.waseda.ac.jp/~fukusima/ruby/xmarshal.html > > Alternatively use SOAP or XML-RPC to marshal your objects. Then you're > not only platform and version independent but also completely language independent. One day I worked out the option a). You can see the (buggy) result at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/19602 Be sure to read Guy's reply and act accordingly. Nevertheless, option b) sounds quite interesting :). Dunno how to tackle it, but very interesting anyway. - Aleksi