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

**URL:** <https://www.ruby-forum.com/t/rubycocoa-error-no-such-file-to-load-tcltklib-loaderror/48080>\
**Category:** Ruby\
**Created:** [November 16, 2005, 5:38pm UTC](https://www.ruby-forum.com/t/rubycocoa-error-no-such-file-to-load-tcltklib-loaderror/48080 "2005-11-16T17:38:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@anne](https://www.ruby-forum.com/u/anne)\
**Post date:** [November 16, 2005, 5:38pm UTC](https://www.ruby-forum.com/t/rubycocoa-error-no-such-file-to-load-tcltklib-loaderror/48080/1 "2005-11-16T17:38:50Z")

</div>

I installed tcltk from  
[http://prdownloads.sourceforge.net/tcltkaqua/TclTkAquaBI-8.4.9.0.dmg?download](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

---

<div class="post-metadata">

**Author:** ![anne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@anne](https://www.ruby-forum.com/u/anne)\
**Post date:** [November 16, 2005, 6:39pm UTC](https://www.ruby-forum.com/t/rubycocoa-error-no-such-file-to-load-tcltklib-loaderror/48080/2 "2005-11-16T18:39:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@anne](https://www.ruby-forum.com/u/anne)\
**Post date:** [November 16, 2005, 7:18pm UTC](https://www.ruby-forum.com/t/rubycocoa-error-no-such-file-to-load-tcltklib-loaderror/48080/3 "2005-11-16T19:18:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@anne](https://www.ruby-forum.com/u/anne)\
**Post date:** [November 17, 2005, 12:05am UTC](https://www.ruby-forum.com/t/rubycocoa-error-no-such-file-to-load-tcltklib-loaderror/48080/4 "2005-11-17T00:05:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@anne](https://www.ruby-forum.com/u/anne)\
**Post date:** [November 16, 2005, 7:45pm UTC](https://www.ruby-forum.com/t/rubycocoa-error-no-such-file-to-load-tcltklib-loaderror/48080/5 "2005-11-16T19:45:41Z")

</div>

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](http://www.rubygarden.org/ruby?RubyOnMacintosh)

and there’s  
[http://www.rubygarden.org/ruby?EmacsExtensions](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

```
