[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Marshal version problem

Greg Willits

7/26/2008 8:51:00 PM

I have a script that generates a serialized file of native data
structures (hash of hashes & arrays and such).

In a short spike script I wanted to load up a particular file, and got a
version error:
incompatible marshal file format (can't be read) (TypeError)
format version 4.8 required; 47.85 given

Both scripts invoke the same ruby instance on my system (OS X)
#! /usr/local/bin/ruby

printing RUBY_VERSION at the top of both scripts yields 1.8.6 in both.

wassup widdat?

-- gw
--
Posted via http://www.ruby-....

2 Answers

Eric Hodel

7/27/2008 12:22:00 AM

0

On Jul 26, 2008, at 13:51 PM, Greg Willits wrote:
> I have a script that generates a serialized file of native data
> structures (hash of hashes & arrays and such).
>
> In a short spike script I wanted to load up a particular file, and
> got a
> version error:
> incompatible marshal file format (can't be read) (TypeError)
> format version 4.8 required; 47.85 given
>
> Both scripts invoke the same ruby instance on my system (OS X)
> #! /usr/local/bin/ruby
>
> printing RUBY_VERSION at the top of both scripts yields 1.8.6 in both.
>
> wassup widdat?

You're not loading a Marshal file, you're loading a file that starts
with "/U"

Greg Willits

7/27/2008 2:14:00 AM

0

Eric Hodel wrote:
> On Jul 26, 2008, at 13:51 PM, Greg Willits wrote:
>> #! /usr/local/bin/ruby
>>
>> printing RUBY_VERSION at the top of both scripts yields 1.8.6 in both.
>>
>> wassup widdat?
>
> You're not loading a Marshal file, you're loading a file that starts
> with "/U"

Bah. Duh, I was giving load() a file path instead of the file data.

Thx.

-- gw
--
Posted via http://www.ruby-....