# Build 32 bit version of ruby 1.92 on snow leopard

**URL:** <https://www.ruby-forum.com/t/build-32-bit-version-of-ruby-1-92-on-snow-leopard/190369>\
**Category:** Ruby\
**Created:** [June 18, 2010, 4:56pm UTC](https://www.ruby-forum.com/t/build-32-bit-version-of-ruby-1-92-on-snow-leopard/190369 "2010-06-18T16:56:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeezs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4af34b/32.png) [@jeezs](https://www.ruby-forum.com/u/jeezs)\
**Post date:** [June 18, 2010, 4:56pm UTC](https://www.ruby-forum.com/t/build-32-bit-version-of-ruby-1-92-on-snow-leopard/190369/1 "2010-06-18T16:56:05Z")

</div>

Hello,

Anybody can help me , I have googled and spend the last two night  
searching forum for the magic terminal sentence that will build a 32 bit  
version of Ruby 1.92 on Snow Leopard.

I need it because “Bowline” ( an application that build stand alone  
executable from ruby/Javascript/CSS)  
only work with Ruby 1.9 32 bit.

Can someone help

Thanks

---

<div class="post-metadata">

**Author:** ![jeezs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4af34b/32.png) [@jeezs](https://www.ruby-forum.com/u/jeezs)\
**Post date:** [June 21, 2010, 1:22am UTC](https://www.ruby-forum.com/t/build-32-bit-version-of-ruby-1-92-on-snow-leopard/190369/2 "2010-06-21T01:22:07Z")

</div>

On Jun 18, 2010, at 7:56 , Jean-eric Godard wrote:

> Hello,
> 
> Anybody can help me , I have googled and spend the last two night  
> searching forum for the magic terminal sentence that will build a 32 bit  
> version of Ruby 1.92 on Snow Leopard.

The magic incantation you need is something like

ARCHFLAGS="-arch i386"

It’s not quite that simple, but I don’t remember what exactly I had to  
do to make it work. Google should be able to tell you how to apply it to  
the compile now that you know what command you want.

You can test the result to see if it built it the way you wanted or not  
by finding one of the binary files that comes from the compile, and  
using the ‘file’ command:

$ file /usr/bin/ruby  
ruby: Mach-O universal binary with 2 architectures  
ruby (for architecture ppc7400): Mach-O executable ppc  
ruby (for architecture i386): Mach-O executable i386

My current version of ruby (version 1.8.7) has both a 32-bit PowerPC and  
. . . huh? Where’s my 64-bit version??

$whereis ruby  
/usr/bin/ruby

$file /system/library/frameworks/ruby.framework/ruby  
/system/library/frameworks/ruby.framework/ruby: Mach-O universal  
binary with 3 architectures  
/system/library/frameworks/ruby.framework/ruby (for architecture  
x86\_64): Mach-O 64-bit dynamically linked shared library x86\_64  
/system/library/frameworks/ruby.framework/ruby (for architecture  
i386): Mach-O dynamically linked shared library i386  
/system/library/frameworks/ruby.framework/ruby (for architecture  
ppc7400): Mach-O dynamically linked shared library ppc

Well, that’s not good. The version of Ruby that came with SnowLeopard  
has THREE architectures in it: PowerPC, 32-bit Intel, and 64-bit Intel.  
Now, how the heck did a two-architecture version get in my /usr/bin  
folder? Well, anyway, hopefully that’ll help you compile a 32-bit  
version of 1.9.2
