I have Ruby 1.8.6 and gem 1.3.4 both on SUSE Linux and on Mac OSX 10.4
(Tiger). Both seemingly don't have the 'tk' module:
On a side note: 1.8.6 is **really** outdated, and unless you have
a very good reason you shouldn't use it anymore and switch to 1.9.3
or 2.0.0. (Even 1.8.7 is not longer supported by the Ruby core team.)
require 'tk'
LoadError: no such file to load -- tk
Which gem do I need to install for getting Tk? I tried
gem install tk
but no such gem was found.
On Ubuntu, there is a libtcltk-ruby package, there might be something
similar for SuSE.
I haven't used this in several years, but the tk_as_gem gem used to work
to
add Tk to an existing Ruby.
Indeed, the gem exists, but installation fails:
tcltklib.c: In function 'lib_eventloop_core':
tcltklib.c:1995: error: 'CHECK_INTS' undeclared (first use in this
function)
(same error on Linux and Mac). Seems that the implementation is broken.
The code part in question looks a bit like unfinished work:
#ifdef RUBY_USE_NATIVE_THREAD
/* if (update_flag == 0) CHECK_INTS; */ /*XXXXXXXXXXXXX TODO
!!!! */ #else
if (update_flag == 0) CHECK_INTS; #endif
Actually, CHECK_INTS isn't defined anywhere, so I guess tests had been
usually done with RUBY_USE_NATIVE_THREAD being set and the error did not
show up.
I wonder whether it is safe to just remove this section from the code.
Or should I for the safe side contact the supporters of this gem?
I have Ruby 1.8.6 and gem 1.3.4 both on SUSE Linux and on Mac OSX 10.4
(Tiger). Both seemingly don't have the 'tk' module:
On a side note: 1.8.6 is **really** outdated, and unless you have
a very good reason you shouldn't use it anymore and switch to 1.9.3
or 2.0.0. (Even 1.8.7 is not longer supported by the Ruby core team.)
I would like to switch too, but from what I know, the later versions
don't run on OSX 10.4.
Maybe they can be ported, but the one-click installer (which *is* very
convenient to use) only offers 1.8.6 for this platform.
There *might* be, but not free. ActiveState has the interesting price
policy, that they hand out the newer versions for free, but for the
older versions we have to pay a pretty steep price (999 US$ per user per
year).
BTW, I don't think that the problem is a missing Tk version on my
systems. On the Mac, I can happily use Python with tkinter (which is
their Tk binding), and on my Linux system I can run wish. The problem is
the interface from Ruby to Tk.
I do not really know anything about OS X, but I'm pretty sure
newer versions should work. I guess commonly used tools like RVM
or homebrew(?) might help.
Regards,
Marcus
···
Am 30.10.2013 10:42, schrieb Ronald Fischer:
unknown wrote in post #1126034:
Am 29.10.2013 16:35, schrieb Ronald Fischer:
I have Ruby 1.8.6 and gem 1.3.4 both on SUSE Linux and on Mac OSX 10.4
(Tiger). Both seemingly don't have the 'tk' module:
On a side note: 1.8.6 is **really** outdated, and unless you have
a very good reason you shouldn't use it anymore and switch to 1.9.3
or 2.0.0. (Even 1.8.7 is not longer supported by the Ruby core team.)
I would like to switch too, but from what I know, the later versions
don't run on OSX 10.4.
Maybe they can be ported, but the one-click installer (which *is* very
convenient to use) only offers 1.8.6 for this platform.
There *might* be, but not free. ActiveState has the interesting price
policy, that they hand out the newer versions for free, but for the
older versions we have to pay a pretty steep price (999 US$ per user per
year).
BTW, I don't think that the problem is a missing Tk version on my
systems. On the Mac, I can happily use Python with tkinter (which is
their Tk binding), and on my Linux system I can run wish. The problem is
the interface from Ruby to Tk.
Maybe they can be ported, but the one-click installer (which *is* very
convenient to use) only offers 1.8.6 for this platform.
Ronald
I do not really know anything about OS X, but I'm pretty sure
newer versions should work. I guess commonly used tools like RVM
or homebrew(?) might help.
Homebrew unfortunately doesn't run on OSX 10.4.
As for rvm, I don't know yet whether it will work, but getting it
running, will be a non-trivial effort. I would have to install a newer
bash version first, which is required by rvm, and also git and
subversion, and with all of this, it is not clear whether I can find a
version which is new enough for rvm, but still supported on my OSX.