Starting with Snow Leopard (OS X v10.6) Apple bundles 64-bit ruby by default. Unfortunately, there is no 64-bit Tk bundled, so the following ruby code will fail:
require 'tk'
Is it some easy way to enable Tk for Ruby in Snow Leopard and higher? Like installing 32-bit ruby or whatever. I have tried to recompile Ruby with Tk support but it seems not that easy – tutorials found in google refers to some options in Ruby’s ./configure script that don’t exists in actual Rby code downloaded from official site :(. I will be glad for any hints – i have a Ruby app with Tk GUI and need to enable my users to use it 🙂
Where was a great improvement over Tk documentation recently. Not they has complete instructions on how to enable Tk for Ruby on OSX 10.6+. This requires ActiveTcl 8.5+ binary distribution and compiling ruby from source. The command i used on OSX 10.7 with XCode 4.2 to compile ruby and replace stock ruby installation (dangerous!):