[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Mac OS X Tiger comes with Tk?

SpringFlowers AutumnMoon

10/14/2007 5:42:00 AM

I thought it is said that Mac OS X Tiger comes with Tk?

when i do ruby

require 'tk'

it gives the following

dyld: NSLinkModule() error
dyld: Library not loaded: /usr/X11R6/lib/libX11.6.dylib
Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
Reason: image not found
Trace/BPT trap
--
Posted via http://www.ruby-....

22 Answers

Ben Bleything

10/14/2007 6:05:00 AM

0

On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
> I thought it is said that Mac OS X Tiger comes with Tk?
>
> when i do ruby
>
> require 'tk'
>
> it gives the following
>
> dyld: NSLinkModule() error
> dyld: Library not loaded: /usr/X11R6/lib/libX11.6.dylib
> Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
> Reason: image not found
> Trace/BPT trap

Looks like you didn't install X from the dev tools. I'd try that, it
makes sense that you would need it.

Ben

SpringFlowers AutumnMoon

10/14/2007 6:29:00 AM

0

Ben Bleything wrote:
> On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
>> Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
>> Reason: image not found
>> Trace/BPT trap
>
> Looks like you didn't install X from the dev tools. I'd try that, it
> makes sense that you would need it.

is that X11 (X window)? how would that be installed (from dev tools)?

thanks.


--
Posted via http://www.ruby-....

Andreas S.

10/14/2007 11:39:00 AM

0

SpringFlowers AutumnMoon wrote:
> Ben Bleything wrote:
>> On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
>>> Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
>>> Reason: image not found
>>> Trace/BPT trap
>>
>> Looks like you didn't install X from the dev tools. I'd try that, it
>> makes sense that you would need it.
>
> is that X11 (X window)? how would that be installed (from dev tools)?

You can find it on your Tiger DVD or download it from Apple. But I don't
understand why TK even depends on X, it doesn't use the X server.
--
Posted via http://www.ruby-....

SpringFlowers AutumnMoon

10/14/2007 3:18:00 PM

0

Andreas S. wrote:
> SpringFlowers AutumnMoon wrote:
>> Ben Bleything wrote:
>>> On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
>>>> Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
>>>> Reason: image not found
>>>> Trace/BPT trap
>>>
>>> Looks like you didn't install X from the dev tools. I'd try that, it
>>> makes sense that you would need it.
>>
>> is that X11 (X window)? how would that be installed (from dev tools)?
>
> You can find it on your Tiger DVD or download it from Apple. But I don't
> understand why TK even depends on X, it doesn't use the X server.

actually, i found those files in

/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib

so I tried to use

ruby -I /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib test.rb

and it won't work...
and then I set the PATH in bash to the following and it won't work
either:

PATH=/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/powerpc/bin:/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib:/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6:/bin:/sbin:/usr/bin:/usr/sbin:.

--
Posted via http://www.ruby-....

Ben Bleything

10/14/2007 4:58:00 PM

0

On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
> Ben Bleything wrote:
> > On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:
> >> Referenced from: /usr/lib/ruby/1.8/powerpc-darwin8.0/tcltklib.bundle
> >> Reason: image not found
> >> Trace/BPT trap
> >
> > Looks like you didn't install X from the dev tools. I'd try that, it
> > makes sense that you would need it.
>
> is that X11 (X window)? how would that be installed (from dev tools)?

Yes, it's X11. It's in the Dev Tools image that you download from
Apple, or installed as part of your OS installation.

Ben

John Joyce

10/14/2007 6:37:00 PM

0

>
> You can find it on your Tiger DVD or download it from Apple. But I
> don't
> understand why TK even depends on X, it doesn't use the X server.
Many libs in X11 can be used by software without using the X server
itself.


SpringFlowers AutumnMoon

10/14/2007 11:07:00 PM

0

John Joyce wrote:
>>
>> You can find it on your Tiger DVD or download it from Apple. But I
>> don't
>> understand why TK even depends on X, it doesn't use the X server.
> Many libs in X11 can be used by software without using the X server
> itself.

So either I have to find my original Mac OS X DVD, or I can download it
from the net....

is it this page?

http://developer.apple.com/opensource/tools/runni...

when i click

download the X11User.pkg

it says the page can't be found

--
Posted via http://www.ruby-....

SpringFlowers AutumnMoon

10/14/2007 11:08:00 PM

0

SpringFlowers AutumnMoon wrote:
> John Joyce wrote:
>>>
>>> You can find it on your Tiger DVD or download it from Apple. But I
>>> don't
>>> understand why TK even depends on X, it doesn't use the X server.
>> Many libs in X11 can be used by software without using the X server
>> itself.
>
> So either I have to find my original Mac OS X DVD, or I can download it
> from the net....
>
> is it this page?
>
> http://developer.apple.com/opensource/tools/runni...
>
> when i click
>
> download the X11User.pkg
>
> it says the page can't be found

By the way I also installed ActiveTcl on the Mac, can't I just start
using Tk? Wow, so big a procedure before being able to use Tk.

--
Posted via http://www.ruby-....

Rick DeNatale

10/15/2007 11:32:00 AM

0

This thread got me looking into my (rather new) macbooks ruby installation.

I installed ruby using macports right after getting the machine. I
don't even have tk.rb to require.

Looking around at macports, it seems that there are TWO port variants
for the ruby port related to tk
one is called just tk, the other mactk.

I'm not sure but I suspect that the tk variant requires X11, and that
the mactk variant doesn't.

I'm still very much an OSX newbie, my last Mac was a ppc which
couldn't run anything past OS 8.something, and I've been using Linux
for some time. I'm not clear yet on what's the best way to try to
rebuild ruby using port to add the mactk variant. Do I need to
uninstall and reinstall or is there a better way?


--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...

Rick DeNatale

10/15/2007 2:06:00 PM

0

On 10/15/07, Rick DeNatale <rick.denatale@gmail.com> wrote:
> This thread got me looking into my (rather new) macbooks ruby installation.
>
> I installed ruby using macports right after getting the machine. I
> don't even have tk.rb to require.
>
> Looking around at macports, it seems that there are TWO port variants
> for the ruby port related to tk
> one is called just tk, the other mactk.
>
> I'm not sure but I suspect that the tk variant requires X11, and that
> the mactk variant doesn't.
>
> I'm still very much an OSX newbie, my last Mac was a ppc which
> couldn't run anything past OS 8.something, and I've been using Linux
> for some time. I'm not clear yet on what's the best way to try to
> rebuild ruby using port to add the mactk variant. Do I need to
> uninstall and reinstall or is there a better way?

Just to follow up, I did this:

$port deactivate ruby
$port install ruby +mactk

This made my current ruby install inactive, then installed a new
version with the mactk option.

The pickaxe Tk hello world application runs and it is using native OSX widgets.

A variation on this is probably the trick to get around the X11 dependency.

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...