Is there an easy way to enable Tk for Ruby in OS X v10.6 +?

Starting with Snow Leopard (OS X v10.6), Apple ships a 64-bit ruby ​​by default. Unfortunately, the delivery kit does not include 64-bit Tk, so the following ruby ​​code will not be executed:

require 'tk'

Can I enable Tk for Ruby in Snow Leopard and higher? Like installing a 32-bit ruby ​​or something else. I tried recompiling Ruby with Tk support, but it's not that simple. The tutorials found in google relate to some parameters in the Ruby ./configurescript that do not exist in the actual Rby code downloaded from the official site :(. Welcome any hints - I have a Ruby application with a Tk GUI and I need my users to use it :)

+3
source share
2

Tk. , Tk Ruby OSX 10.6+. ActiveTcl 8.5+ ruby ​​ . , OSX 10.7 XCode 4.2 ruby ​​ (!):

./configure --prefix=/usr --with-arch=x86_64,i386 --enable-pthread --enable-shared --with-gcc=clang
make
sudo make install
0

Tk 64- OSX, 8.6 "ZIP" "TGZ" (- - , ). , , --enable-aqua --enable-64bit, , .

(, , Tk Ruby, , , . , , .)

+1

All Articles