Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > LoadError: no such file to load -- tk

Reply
Thread Tools

LoadError: no such file to load -- tk

 
 
Luis Lavena
Guest
Posts: n/a
 
      07-22-2010
On Jul 22, 3:23*pm, Rich Leblanc <rl...@pacbell.net> wrote:
>
> I'm following this tutorial:http://www.ruby-lang.org/en/documentation/quickstart/
>
> It says:
> "If you’re using Windows, open fxri from the Ruby section of your Start
> Menu."
>
> I don't have that. I guess it's because I just copied your directory
> tree over and didn't install it the "right" way. See? this is why I want
> to learn to do things the correct way.


In Ruby there is no "correct" or incorrect way, there are different
paths to achieve the same or similar results.

What you're reading is a reference to FXRI, which was part of One-
Click Installer, but is no longer part of the newer installer, which
are lean packages around vanilla ruby.

If you copied or extracted an independent package (no installer) then
is logical you will not have menu to look for options.

If you install RubyInstaller, any of the versions, you can click
"Interactive Ruby" and you will be able to use IRB.

Or from the command line, just call "irb"

--
Luis Lavena
 
Reply With Quote
 
 
 
 
Roger Pack
Guest
Posts: n/a
 
      07-22-2010

>> Thanks Roger. I'm up and running now on Windows using the one you made.
>> I'm going to read up on the ruby installer. Now I just need to get it
>> going on Unix, same problem.
>>
>> Rich

>
> I copied your directory tree over and it works but in windows when you
> install things doesn't it have to make registry entries or anything
> besides copying files and folders? Isn't that what installers do? Or
> does Ruby not require any of that? To install Ruby is it just a matter
> of copying files and folders? I'm still reading about the installer but
> it's not making any sense yet.


Ruby on windows is built to be self contained, and you can move it all
over the place and just use it.
You *can* get an install that uses the registry (and hence can't be
moved) over at rubyinstaller.org. The package I gave you isn't like
that.
-r
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Hidetoshi NAGAI
Guest
Posts: n/a
 
      07-22-2010
From: Rich Leblanc <>
Subject: Re: LoadError: no such file to load -- tk
Date: Thu, 22 Jul 2010 09:47:35 +0900
Message-ID: <>
> > Probably, ext/tk/extconf.rb outputs some messages about searching and
> > testing Tcl/Tk libraries (and {tcl,tk}Config.sh) during make steps.
> > Please tell me the messages, too.

>
> On a FreeBSD 8.0 machine I went to \usr\ports\lang\tcl85 and as root
> ran; make install clean. This installed tcl 8.5. On command line if I


I need the messages at ext/tk step of "make".
--
Hidetoshi NAGAI ()
Department of Artificial Intelligence, Kyushu Institute of Technology

 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Roger Pack wrote:
>
>>> Thanks Roger. I'm up and running now on Windows using the one you made.
>>> I'm going to read up on the ruby installer. Now I just need to get it
>>> going on Unix, same problem.
>>>
>>> Rich

>>
>> I copied your directory tree over and it works but in windows when you
>> install things doesn't it have to make registry entries or anything
>> besides copying files and folders? Isn't that what installers do? Or
>> does Ruby not require any of that? To install Ruby is it just a matter
>> of copying files and folders? I'm still reading about the installer but
>> it's not making any sense yet.

>
> Ruby on windows is built to be self contained, and you can move it all
> over the place and just use it.
> You *can* get an install that uses the registry (and hence can't be
> moved) over at rubyinstaller.org. The package I gave you isn't like
> that.
> -r


Yes, I know. How can I build Ruby that includes tk and an installer to
install it to windows? Since there's no "right" or "wrong" way then how
am I supposed to know what to do?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Roger Pack wrote:
>
>>> 1.9.1 didn't build the Tk extension all that well on windows. It should
>>> be fixed with 1.9.2...or there may be some other bug since I only use
>>> mingw not VC to compile it.
>>>

>>
>> The tutorial says use 1.8.x not 1.9.x.

>
> If you're interested in a 1.8.x that works with tk, see
> http://rubyinstaller.org/downloads/
> "Ruby 1.8.6-p27 (RC2)"
>
> Install that, and activeState 8.5 in your path and it should "just work"
>>> To reproduce it go into your ext/tk library and run extconf.rb (and
>>> nmake I guess). It should fail.
>>>

>>
>> Reproduce what? I don't understand.

>
> Reproduce ruby not "finding" Tk to compile it in.
>
>> I'm trying. That's why I'm here. It seems that tk library is not in the
>> right place when compiling. Is that it?

>
> I think so.
>
>> Then where should it be so I can
>> check and see if it's there?

>
> I'm not sure I've never built it using mswin.
>
> If you want to build it with mingw checkout the tcl branch of
> rubyinstaller:
> http://github.com/oneclick/rubyinstaller/tree/tcl
>
>


Ok I got Inno Setup 5 now what? Couldn't figure out the next step from
that site.


> if you run a rake from there


Where is "there"?

> (rake ruby1
> it should build ruby with the tk extension built.
>


Don't know how to do this. The site says;

"Ensure you are connected to the Internet, open a Command Prompt, 'cd'
to the
project root directory,"


What is the "project root directory"?


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

 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Roger Pack wrote:
> Rich Leblanc wrote:
>> Roger Pack wrote:


> I downloaded 1.9.1p429 from http://rubyinstaller.org/downloads/
> then downloaded "â—¦Ruby/Tk environment" from from
> http://www.ruby-forum.com/topic/210186#new


Ok, I got those.

> and unpackaged it to the appropriate directory.


What does that mean? You ran the Ruby installer to create a directory
tree on windows, then copied "â—¦Ruby/Tk environment" to the "appropriate
directory" (whatever that is) then gave a copy of the whole resultant
directory tree to me? What is the "appropriate directory"? If you use
explicit paths it would be a lot easier for me to understand.

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

 
Reply With Quote
 
Roger Pack
Guest
Posts: n/a
 
      07-22-2010
Rich Leblanc wrote:
> Roger Pack wrote:
>> Rich Leblanc wrote:
>>> Roger Pack wrote:

>
>> I downloaded 1.9.1p429 from http://rubyinstaller.org/downloads/
>> then downloaded "â—¦Ruby/Tk environment" from from
>> http://www.ruby-forum.com/topic/210186#new

>
> Ok, I got those.
>
>> and unpackaged it to the appropriate directory.

>
> What does that mean? You ran the Ruby installer to create a directory
> tree on windows, then copied "â—¦Ruby/Tk environment" to the "appropriate
> directory" (whatever that is) then gave a copy of the whole resultant
> directory tree to me? What is the "appropriate directory"? If you use
> explicit paths it would be a lot easier for me to understand.


I unzipped a .7z file from rubyinstaller,
then followed the instructions on
http://www.dumbo.ai.kyutech.ac.jp/~n...k/?Ruby/Tk-Kit

specifically "Ruby/Tk environment (please extract at RubyInstaller's
lib/ruby/1.9.1) :
rubytk-simple-w-img_ext-20100523-for-RubyInstaller191.zip"

HTH.
-r
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      07-22-2010
On Jul 22, 6:46Â*pm, Rich Leblanc <rl...@pacbell.net> wrote:
> Roger Pack wrote:
> > Rich Leblanc wrote:
> >> Roger Pack wrote:

> > I downloaded 1.9.1p429 fromhttp://rubyinstaller.org/downloads/
> > then downloaded "â—¦Ruby/Tk environment" from from
> >http://www.ruby-forum.com/topic/210186#new

>
> Ok, I got those.
>
> > and unpackaged it to the appropriate directory.

>
> What does that mean? You ran the Ruby installer to create a directory
> tree on windows, then copied "â—¦Ruby/Tk environment" to the "appropriate
> directory" (whatever that is) then gave a copy of the whole resultant
> directory tree to me? What is the "appropriate directory"? If you use
> explicit paths it would be a lot easier for me to understand.
>


He can't use explicit paths in the example because he doesn't know
your setup.

You need to find your way too, don't expect receive a 100% to the
letter type of instructions since you're not providing enough details.

I believe you are getting over complicated and Roger's instructions
are not helping you because the instructions expect certain knowledge
of build tools and building Ruby.

You should try the following, and if doesn't work, start a new thread
instead of this eternal back and forth between so many instructions:

1) Download Ruby 1.9.1 installers form RubyInstaller website.

http://rubyinstaller.org/

2) Install the Development Kit, accessible from the same website and
follow the instructions detailed here:

http://wiki.github.com/oneclick/ruby...evelopment-kit

3) Install Tcl, or if you have already installed, figure it out where
it was installed in your system.

4) Take note of Tcl location and add the binaries location to the
PATH:

SET PATH=<path to Tcl bin directory>;%PATH%

5) Install tk-win gem:

gem install tk-win

6) Start using it

require 'rubygems'
require 'tk'

--
Luis Lavena
 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-23-2010
Hidetoshi NAGAI wrote:
> From: Rich Leblanc <>
> Subject: Re: LoadError: no such file to load -- tk
> Date: Thu, 22 Jul 2010 09:47:35 +0900
> Message-ID: <>
>> > Probably, ext/tk/extconf.rb outputs some messages about searching and
>> > testing Tcl/Tk libraries (and {tcl,tk}Config.sh) during make steps.
>> > Please tell me the messages, too.

>>
>> On a FreeBSD 8.0 machine I went to \usr\ports\lang\tcl85 and as root
>> ran; make install clean. This installed tcl 8.5. On command line if I

>
> I need the messages at ext/tk step of "make".



Here's all the output from the terminal:

# make install clean
===> Installing for tcl-8.5.8
===> tcl-8.5.8 depends on file:
/usr/local/lib/tcl8/8.5/tcltest-2.3.2.tm - found
===> Generating temporary packing list
===> Checking if lang/tcl85 already installed
Installing libtcl85.so.1 to /usr/local/lib/
Installing libtcl85.a
Installing tclsh as /usr/local/bin/tclsh8.5
Installing tclConfig.sh to /usr/local/lib/tcl8.5/
Installing libtclstub85.a to /usr/local/lib/
Installing message catalogs
Creating msgs
Making directory /usr/local/include/tcl8.5/generic
Making directory /usr/local/include/tcl8.5/unix
Making directory /usr/local/lib/tcl8.5/opt0.4
Making directory /usr/local/lib/tcl8.5/http1.0
Making directory /usr/local/lib/tcl8.5/encoding
Installing header files
Installing library files to /usr/local/lib/tcl8.5
Installing library http1.0 directory
Installing library opt0.4 directory
Installing library encoding directory
Installing time zone data
Creating tzdata
Creating Australia
Creating Canada
Creating Arctic
Creating Asia
Creating Africa
Creating America
Creating North_Dakota
Creating Indiana
Creating Kentucky
Creating Argentina
Creating Indian
Creating SystemV
Creating Pacific
Creating Etc
Creating Chile
Creating US
Creating Brazil
Creating Atlantic
Creating Mexico
Creating Antarctica
Creating Europe
/bin/mkdir -p /usr/local/share/tcl8.5
install -o root -g wheel -m 444
/usr/ports/lang/tcl85/work/tcl8.5.8/unix/../doc/man.macros
/usr/local/share/tcl8.5
/bin/mkdir -p /usr/local/man/man1
install -o root -g wheel -m 444
/usr/ports/lang/tcl85/work/tcl8.5.8/unix/../doc/tclsh.1
/usr/local/man/man1/tclsh8.5.1
Installing and cross-linking C API (.3) docs
Installing and cross-linking command (.n) docs
**********
IMPORTANT:
**********
tclConfig.sh in /usr/local/lib/tcl8.5/tclConfig.sh
tcl.h in /usr/local/include/tcl8.5/tcl.h
tclDecls.h in /usr/local/include/tcl8.5/tclDecls.h
There are NOT default place, but good place to avoid
conflicting with another version of Tcl/Tks.
===> Compressing manual pages for tcl-8.5.8
===> Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===> Registering installation for tcl-8.5.8
===> SECURITY REPORT:
This port has installed the following files which may act as
network
servers and may therefore pose a remote security risk to the
system.
/usr/local/lib/libtcl85.so.1

If there are vulnerabilities in these programs there may be a
security
risk to the system. FreeBSD makes no guarantee about the security
of
ports included in the Ports Collection. Please type 'make
deinstall'
to deinstall the port if this is a concern.

For more information, and contact details about the security
status of this software, see the following webpage:
http://www.tcl.tk/
===> Cleaning for tcl-8.5.8


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

 
Reply With Quote
 
Roger Pack
Guest
Posts: n/a
 
      07-23-2010
> I need the messages at ext/tk step of "make".


>Here's all the output from the terminal:


> # make install clean
>===> Installing for tcl-8.5.8
>===> tcl-8.5.8 depends on file:
>/usr/local/lib/tcl8/8.5/tcltest-2.3.2.tm - found


He wanted the messages from the output of ruby/ext/tk step of "make"
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Such a pitty! Such a great person gone! WhorryIrressy Wireless Networking 0 01-28-2008 04:24 PM
Failed to install Rails No such file to load -- rubygems/security (LoadError) Zoong Pham Ruby 1 08-11-2005 01:39 PM
Ruby: No such file to load -- ubygems (LoadError) Brian Takita Ruby 7 05-24-2005 07:11 PM
[BUG] RubyGems: "No such file to load -- rubygems/builder" Erik Veenstra Ruby 4 02-04-2005 10:28 PM
Getting error: ..."in 'require': No such file to load -- socket (LoadError) Ruby Ruby Ruby 0 04-22-2004 12:34 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57