# Preprocessing ruby gems in ruby1.9

**URL:** <https://www.ruby-forum.com/t/preprocessing-ruby-gems-in-ruby1-9/166840>\
**Category:** Ruby\
**Created:** [April 30, 2009, 2:04am UTC](https://www.ruby-forum.com/t/preprocessing-ruby-gems-in-ruby1-9/166840 "2009-04-30T02:04:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/258eb7/32.png) [@botp](https://www.ruby-forum.com/u/botp)\
**Post date:** [April 30, 2009, 2:04am UTC](https://www.ruby-forum.com/t/preprocessing-ruby-gems-in-ruby1-9/166840/1 "2009-04-30T02:04:22Z")

</div>

i notice that almost all pre 1.9 gems wont compile in ruby1.9 because  
of the ff error (or something like it),

: error: ‘struct RArray’ has no member named ‘len’  
: error: ‘struct RArray’ has no member named ‘ptr’  
…

the typical solution i do is outlined here  
[frozenplague.net](http://frozenplague.net/2009/01/ruby-191-rubygems-rails/#gem_solution),  
and it works 100% on my case (glad hasn’t failed yet).

can this solution be handled by the rubygem preprocessor? maybe,  
signal a flag of some sort, or do a best-effort processing of some  
sort ?..

kind regards -botp

---

<div class="post-metadata">

**Author:** ![botp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/258eb7/32.png) [@botp](https://www.ruby-forum.com/u/botp)\
**Post date:** [April 30, 2009, 8:33am UTC](https://www.ruby-forum.com/t/preprocessing-ruby-gems-in-ruby1-9/166840/2 "2009-04-30T08:33:06Z")

</div>

On Apr 29, 2009, at 17:03, botp wrote:

> can this solution be handled by the rubygem preprocessor? maybe,  
> signal a flag of some sort, or do a best-effort processing of some  
> sort ?..

You could probably write a RubyGems plugin to do it using the  
pre\_install hook.
