Rubycocoa error "No such file to load -- tcltklib (LoadError

I installed tcltk from
http://prdownloads.sourceforge.net/tcltkaqua/TclTkAquaBI-8.4.9.0.dmg?download

I reinstalled ruby 1.8.3 on mac 10.3 with the option
…/configure --enable-pthread --enable-mac-tcltk-framework

rubycocoa gives me “No such file to load – tcltklib (LoadError)”
I find references to a readme file in ext but I don’t know where that
ext directory is on the mac. How do I find the library and set the path
on my mac?

I got a snipet from ruby developer’s which runs at the ruby command
line, but not ruby cocoa.
require ‘tk’
root = TkRoot.new
button = TkButton.new(root) {
text “Hello,Anne”
command proc { puts “I said”}
}
button.pack
Tk.mainloop

rubycocoa does work with puts “hello”.

thank you for your help

On 16 Nov 2005, at 16:37, anne001 wrote:

path
button.pack
Tk.mainloop

rubycocoa does work with puts “hello”.

thank you for your help

rubycocoa is the Ruby interface bindings to the native cocoa GUI
toolkit of the Mac.
tcl is a scripting language and its standard GUI toolkit is tk that
uses non native widgets - i.e. has its own unique look and feel.
tclTkAqua is the tcl Tk toolkit that uses native Mac widgets

The tk toolkit is widely ported and many other bindings to it have
been produced, including Ruby.

If you are using rubycocoa then it doesn’t make sense to me why you
would want to use tcl, tk or tckTkAqua as you are trying to mix
different GUI toolkits.

Dave.

I started looking at OO with objective C, x code and cocoa. I
downloaded rubycocoa to be able to continue to use the xcode
environment. So far I have been able to run script code fine in ruby
projects in Cocoa.

I read about trying to set up emacs to work with Ruby, but again it is
going to mean a lot of running around looking for a source,
instructions… So if it is a matter of learning how to find a file and
setting a path! that might be faster.

I am trying to set up an environment where I don’t have to go to
terminal to compile my code or find my files.

anne001 wrote:

I am trying to set up an environment where I don’t have to go to
terminal to compile my code or find my files.

Anne001, you have many alternatives on a Mac:

  • Eclipse + Ruby Development Tools. I did some Ruby/Tk code in that
    environment. You can run your Ruby code from Eclipse.
  • jEdit + Ruby Editor plugin.
  • Smultron
  • TextMate

jEdit has plugins to let you consult Rdoc (APIs), and the specific ruby
plugin brings autocompletion for standard classes methods.
The last three still require to open a Terminal to run your code.
BTW there is a very useful little utility named “Open Terminal Here”, by
Marc Liyanage. It lets you browse your disk to find a file then once you
found it, open a terminal right there. If you change you mind or have
done a couple of cd in your terminal and want to go back to the window
mode, just type “open .”, it’ll open a Finder window at your current
location in the terminal.

You may need to install gem in order to install other Ruby libraries.
I am not familiar with emacs, my comfort zone is more vi, but I know
emacs is a great tool once you get some fluency with its commands, and
it may be hard to decide to depart from great tools.

Cheers,
J-P

On Thu, 17 Nov 2005, anne001 wrote:

I read about trying to set up emacs to work with Ruby, but again it is
going to mean a lot of running around looking for a source,
instructions… So if it is a matter of learning how to find a file and
setting a path! that might be faster.

While the Emacs and Mac people compose their more useful replies:
there is this on the Wiki which may be of some help
http://www.rubygarden.org/ruby?RubyOnMacintosh

and there’s
http://www.rubygarden.org/ruby?EmacsExtensions

I am trying to set up an environment where I don’t have to go to
terminal to compile my code or find my files.

    HTH
    Hugh