# Marshal version problem

**URL:** <https://www.ruby-forum.com/t/marshal-version-problem/144220>\
**Category:** Ruby\
**Created:** [July 26, 2008, 10:57pm UTC](https://www.ruby-forum.com/t/marshal-version-problem/144220 "2008-07-26T22:57:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![S-gw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Post date:** [July 26, 2008, 10:57pm UTC](https://www.ruby-forum.com/t/marshal-version-problem/144220/1 "2008-07-26T22:57:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![S-gw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Post date:** [July 27, 2008, 2:28am UTC](https://www.ruby-forum.com/t/marshal-version-problem/144220/2 "2008-07-27T02:28:21Z")

</div>

On Jul 26, 2008, at 13:51 PM, Greg W. 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”

---

<div class="post-metadata">

**Author:** ![S-gw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Post date:** [July 27, 2008, 4:20am UTC](https://www.ruby-forum.com/t/marshal-version-problem/144220/3 "2008-07-27T04:20:22Z")

</div>

Eric H. wrote:

> On Jul 26, 2008, at 13:51 PM, Greg W. 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
