Mac OS X TK

Message-ID: <450D6791-CD09-492D-8F94-8CB832B90C3A@grayproductions.net>

> Please check the RELEASE_DATEs by
> ---------------------------------------------------------------
> /usr/local/bin/ruby -r tk -e 'p TclTkLib::RELEASE_DATE; p
> Tk::RELEASE_DATE; p TkUtil::RELEASE_DATE'
> ---------------------------------------------------------------

$ /usr/local/bin/ruby -r tk -e 'p TclTkLib::RELEASE_DATE; p
Tk::RELEASE_DATE; p TkUtil::RELEASE_DATE'
/usr/local/lib/ruby/1.8/tk/event.rb:397: undefined method
`_define_attribute_aliases' for CallbackSubst:Class (NoMethodError)
         from /usr/local/lib/ruby/1.8/tk.rb:804

Ah, sorry.

···

From: James Edward Gray II <james@grayproductions.net>
Subject: Re: Mac OS X TK
Date: Mon, 28 Nov 2005 09:26:17 +0900
---------------------------------------------------------------
/usr/local/bin/ruby -r tcltklib -e 'p TclTkLib::RELEASE_DATE'
/usr/local/bin/ruby -r tkutil -e 'p TkUtil::RELEASE_DATE'
grep RELEASE_DATE /usr/local/lib/ruby/1.8/tk.rb
---------------------------------------------------------------

I pull a fresh copy of the Ruby source whenever I try to build. I
have however upgraded to 1.8.3 and 1.8.4pr1, then downgraded back to
1.8.2. Could my library directories be messed up by this process?

Maybe. Was the fresh copy extracted to a new clean directory?
Your '/usr/local/lib/ruby/1.8/tk/event.rb' is derived from 1.8.3 or
1.8.4-preview1, and your '/usr/local/lib/ruby/1.8/powerpc-darwin8.3.0/
tkutil.bundle' is derived from 1.8.2.
Please rename '/usr/local/lib/ruby' to '/usr/local/lib/ruby.old',
and try to re-install Ruby from a new clean directory.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Neo:~$ /usr/local/bin/ruby -r tcltklib -e 'p TclTkLib::RELEASE_DATE'
"2004-12-23"
Neo:~$ /usr/local/bin/ruby -r tkutil -e 'p TkUtil::RELEASE_DATE'
"2004-12-23"
Neo:~$ grep RELEASE_DATE /usr/local/lib/ruby/1.8/tk.rb
   RELEASE_DATE = '2004-12-24'.freeze

Is this what you expected to see?

James Edward Gray II

···

On Nov 27, 2005, at 9:30 PM, Hidetoshi NAGAI wrote:

From: James Edward Gray II <james@grayproductions.net>
Subject: Re: Mac OS X TK
Date: Mon, 28 Nov 2005 09:26:17 +0900
Message-ID: <450D6791-CD09-492D-8F94-8CB832B90C3A@grayproductions.net>

Please check the RELEASE_DATEs by
---------------------------------------------------------------
/usr/local/bin/ruby -r tk -e 'p TclTkLib::RELEASE_DATE; p
Tk::RELEASE_DATE; p TkUtil::RELEASE_DATE'
---------------------------------------------------------------

$ /usr/local/bin/ruby -r tk -e 'p TclTkLib::RELEASE_DATE; p
Tk::RELEASE_DATE; p TkUtil::RELEASE_DATE'
/usr/local/lib/ruby/1.8/tk/event.rb:397: undefined method
`_define_attribute_aliases' for CallbackSubst:Class (NoMethodError)
         from /usr/local/lib/ruby/1.8/tk.rb:804

Ah, sorry.
---------------------------------------------------------------
/usr/local/bin/ruby -r tcltklib -e 'p TclTkLib::RELEASE_DATE'
/usr/local/bin/ruby -r tkutil -e 'p TkUtil::RELEASE_DATE'
grep RELEASE_DATE /usr/local/lib/ruby/1.8/tk.rb
---------------------------------------------------------------

Yes, I always extract to a clean directory.

James Edward Gray II

···

On Nov 27, 2005, at 9:30 PM, Hidetoshi NAGAI wrote:

I pull a fresh copy of the Ruby source whenever I try to build. I
have however upgraded to 1.8.3 and 1.8.4pr1, then downgraded back to
1.8.2. Could my library directories be messed up by this process?

Maybe. Was the fresh copy extracted to a new clean directory?

Message-ID: <EDF2A6E1-DB59-4054-8B08-9CA78C7AC522@grayproductions.net>

Neo:~$ /usr/local/bin/ruby -r tcltklib -e 'p TclTkLib::RELEASE_DATE'
"2004-12-23"
Neo:~$ /usr/local/bin/ruby -r tkutil -e 'p TkUtil::RELEASE_DATE'
"2004-12-23"
Neo:~$ grep RELEASE_DATE /usr/local/lib/ruby/1.8/tk.rb
   RELEASE_DATE = '2004-12-24'.freeze

Is this what you expected to see?

Hmmm...
It tells me that your '/usr/local/lib/ruby/1.8/tk.rb' is derived
from 1.8.2 and your '/usr/local/lib/ruby/1.8/tk/event.rb' is
derived from 1.8.3 (or 1.8.4).
That is very strange.
If you used a really clean source tree and had no errors on
'make install', I cannot understand the reason of your trouble.
Probably, the simplest way to escape the trouble is to replace
all files for Ruby/Tk under '/usr/local/lib/ruby/1.8/' to files
under '<1.8.2-source>/ext/tk/lib/' by your hand.

···

From: James Edward Gray II <james@grayproductions.net>
Subject: Re: Mac OS X TK
Date: Mon, 28 Nov 2005 22:34:51 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Bingo! That fixed it.

Thank you very much for all your tireless help!!!

James Edward Gray II

···

On Nov 28, 2005, at 11:54 AM, Hidetoshi NAGAI wrote:

Hmmm...
It tells me that your '/usr/local/lib/ruby/1.8/tk.rb' is derived
from 1.8.2 and your '/usr/local/lib/ruby/1.8/tk/event.rb' is
derived from 1.8.3 (or 1.8.4).
That is very strange.
If you used a really clean source tree and had no errors on
'make install', I cannot understand the reason of your trouble.
Probably, the simplest way to escape the trouble is to replace
all files for Ruby/Tk under '/usr/local/lib/ruby/1.8/' to files
under '<1.8.2-source>/ext/tk/lib/' by your hand.

James-

  i have been watching this thread a little bit because I failed to get tk working on my custom built ruby on OSX tiger. If its not too much trouble would you mind summarizing the process you just figured out to get it working? I would very much appreciate it as I think many others would as well.

Thanks-

-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra@yakima-herald.com
509-577-7732

···

On Nov 28, 2005, at 11:44 AM, James Edward Gray II wrote:

On Nov 28, 2005, at 11:54 AM, Hidetoshi NAGAI wrote:

Hmmm...
It tells me that your '/usr/local/lib/ruby/1.8/tk.rb' is derived
from 1.8.2 and your '/usr/local/lib/ruby/1.8/tk/event.rb' is
derived from 1.8.3 (or 1.8.4).
That is very strange.
If you used a really clean source tree and had no errors on
'make install', I cannot understand the reason of your trouble.
Probably, the simplest way to escape the trouble is to replace
all files for Ruby/Tk under '/usr/local/lib/ruby/1.8/' to files
under '<1.8.2-source>/ext/tk/lib/' by your hand.

Bingo! That fixed it.

Thank you very much for all your tireless help!!!

James Edward Gray II

I certainly would. I have Tk working by using the built-in /usr/bin/ruby (which I actually renamed /usr/bin/ruby_apple to be clear), but I'd love to have it working with my home-grown build in /usr/local/bin/ruby

···

On Nov 28, 2005, at 8:49 PM, Ezra Zygmuntowicz wrote:

  i have been watching this thread a little bit because I failed to get tk working on my custom built ruby on OSX tiger. If its not too much trouble would you mind summarizing the process you just figured out to get it working? I would very much appreciate it as I think many others would as well.

If you have not yet installed 1.8.3 / 1.8.4, you shouldn't have any
polution in your directories...
just rebuild 1.8.2 as described at the top of this page:

After months of failing at getting Tk installed, I followed those
instructions and it just 'worked'

···

On 11/28/05, Gavin Kistner <gavin@refinery.com> wrote:

On Nov 28, 2005, at 8:49 PM, Ezra Zygmuntowicz wrote:
> i have been watching this thread a little bit because I failed to
> get tk working on my custom built ruby on OSX tiger. If its not too
> much trouble would you mind summarizing the process you just
> figured out to get it working? I would very much appreciate it as I
> think many others would as well.

I certainly would. I have Tk working by using the built-in /usr/bin/
ruby (which I actually renamed /usr/bin/ruby_apple to be clear), but
I'd love to have it working with my home-grown build in /usr/local/
bin/ruby

Greg is right that most of my trouble was causes by bad library files. If you're not having that problem, it should be quite easy to get working.

The biggest gotcha I found: TK-Aqua doesn't require X11, but Ruby/TK does! It will only work if you have it installed.

James Edward Gray II

···

On Nov 29, 2005, at 12:46 AM, Gregory Brown wrote:

On 11/28/05, Gavin Kistner <gavin@refinery.com> wrote:

On Nov 28, 2005, at 8:49 PM, Ezra Zygmuntowicz wrote:

      i have been watching this thread a little bit because I failed to
get tk working on my custom built ruby on OSX tiger. If its not too
much trouble would you mind summarizing the process you just
figured out to get it working? I would very much appreciate it as I
think many others would as well.

I certainly would. I have Tk working by using the built-in /usr/bin/
ruby (which I actually renamed /usr/bin/ruby_apple to be clear), but
I'd love to have it working with my home-grown build in /usr/local/
bin/ruby

If you have not yet installed 1.8.3 / 1.8.4, you shouldn't have any
polution in your directories...