Using TK with Mac Snow Leopard and Ruby 1.87

P

patrick lynch

I'm going thru the book 'Learning Ruby' and am trying to use TK...
In IRB, I entered the command: require 'tk' but it returns: no such
file...
If I go to the shell and enter the command: tclsh it works.
So, I'm guessing I have TK but Ruby can't find it...
I'm a 'newbie' to the Mac and I've just gone thru the agony of updating
my Rails, I had to buy a Snow Leopard upgrade [$24.99] to do this...
I'm heading to the new version of the Pickaxe book and have done Rails a
while back on a PC...

So, I'm looking to use Rails but would like to put up a few apps with
TK...and I have to use the Mac...

I'd appreciate any help...

Thank you
 
R

Ryan Davis

I'm going thru the book 'Learning Ruby' and am trying to use TK...
In IRB, I entered the command: require 'tk' but it returns: no such
file...
If I go to the shell and enter the command: tclsh it works.
So, I'm guessing I have TK but Ruby can't find it...
I'm a 'newbie' to the Mac and I've just gone thru the agony of = updating
my Rails, I had to buy a Snow Leopard upgrade [$24.99] to do this...
I'm heading to the new version of the Pickaxe book and have done Rails = a
while back on a PC...
=20
So, I'm looking to use Rails but would like to put up a few apps with
TK...and I have to use the Mac...
=20
I'd appreciate any help...

Apple doesn't ship ruby with tk on 10.6 (but did with 10.5). You can =
verify that with `gem which tk`. If you build your own you'll have it, =
but I can't verify that it works:

713 % rvm 1.9.2
714 % gem which tk
/Users/ryan/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/tk.rb
 
P

patrick lynch

gem which tk gives the following error: ERROR: Can't find ruby library
file or shared library tk

...looks like i'm going to have to install tk...bummer

thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top