From: "Sandor Szücs" Date: 2009-02-03T06:50:41+09:00 Subject: Re: How to tell if one is running 32 or 64 bit Ruby on Mac OS X? On 02.02.2009, at 21:45, Timo Geusch wrote: > Wes Gamble writes: > >>> Maybe >>> ruby -v >>> ? >> >> Output of ruby -v: >> >> ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] >> >> Does "universal-darwin9.0" imply 32-bit? > > Not really - a universal binary is one that works both on the older > PowerPC architecture and the Intel Macs... Just to add a universal binary is a container binary, in which you can add several CPU architectures. Use `lipo' if you want more information or add/delete architectures. $ lipo -detailed_info /usr/bin/ruby Fat header in: /usr/bin/ruby fat_magic 0xcafebabe nfat_arch 2 architecture ppc7400 cputype CPU_TYPE_POWERPC cpusubtype CPU_SUBTYPE_POWERPC_7400 offset 4096 size 13776 align 2^12 (4096) architecture i386 cputype CPU_TYPE_I386 cpusubtype CPU_SUBTYPE_I386_ALL offset 20480 size 17824 align 2^12 (4096) If you want to run it on a specific platform use `arch' $ arch -arch x86_64 /usr/bin/ruby arch: posix_spawnp: /usr/bin/ruby: Bad CPU type in executable zsh: exit 1 arch -arch x86_64 /usr/bin/ruby $ arch -arch ppc /usr/bin/ruby ^C The manpage of `arch' : -------------8<------------- The arch_name argument must be one of the currently supported architectures: i386 32-bit intel ppc 32-bit powerpc ppc64 64-bit powerpc x86_64 64-bit intel ------------->8------------- regards, Sandor Szücs --