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

 
 
Roger Pack
Guest
Posts: n/a
 
      07-21-2010

>>> http://faithpromotingrumors.org/inco...386-mingw32.7z


> Ok I've unzipped this thing now how do I install it? And what would I do
> if you didn't make me this? I'd really like to get the original problem
> fixed and figure out how to get the 1.8.x source compiled and working as
> in that tutorial. I'd like to know how to get the proper files in the
> right place and understand what I'm doing not "click one button and have
> it magically work".


You don't need to install it, just cd into the
"ruby-1.9.1-p429-i386-mingw32\bin" directory and run ruby/irb or what
not (or add that folder to your PATH).


> I don't want to start getting sidetracked. How can I build the 1.8.x
> source properly with tk and avoid this error? That was my original
> question. I also need to get this working on my Unix machine next (or in
> parallel). As far as I know there is no "one-click installer" for that.
> I need to know what goes where. Aren't there any install instructions
> anywhere?


Unfortunately your original quest was to build ruby using VC with the Tk
extension installed. I've never done that. The "main line" ruby
installer has moved to mingw so almost *nobody* does that anymore. You
are treading in difficult waters and unless you want to tread alone, I
would recommend going with a more standard approach. The directions in
that tutorial are out of date. Why punish yourself?

If you follow my instructions *already given you* for building it with
mingw (search for "ruby18"), it will work for both ruby18 or ruby19,
depositing a working ruby into sandbox/ruby_mingw for you to work with.

Currently there isn't a one click distributable for 1.9 that has Tk, but
it's in the works. If you want a one click distributable for 1.8 that
has Tk, search the above threads for "RC2"

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

 
Reply With Quote
 
 
 
 
Rich Leblanc
Guest
Posts: n/a
 
      07-21-2010
Hidetoshi NAGAI wrote:
> From: Rich Leblanc <(E-Mail Removed)>
> Subject: Re: LoadError: no such file to load -- tk
> Date: Wed, 21 Jul 2010 11:16:27 +0900
> Message-ID: <(E-Mail Removed)>
>> This is getting more and more confusing. How do I check check
>> consistency of architecture between Ruby and Tcl/Tk if it's 32 bit or
>> 64? I thought 32 bit apps can run on a 64 bit machine. This tutorial is

>
> # Because I'm not familiar with development on Windows, the following
> # may be wrong.
>
> On Ruby/Tk, Ruby links tcltklib.so and links dynamic link librariies
> of Tcl/Tk. If Ruby's core is a 32bit binary and Tcl/Tk DLLs are 64bit
> binaries, Ruby cannot link Tcl/Tk DLLs.
> It's not about OS, but consistency between an executable and DLLs.
>
> Which version of ActiveTcl did you download?
> If its platform is "Windows (x86)", it is 32bit version of Tcl/Tk.
> But if you download "Windows (64-bit, x64)", then 64bit.
>


I have installed ActiveTcl 8.5.8.2 (64-bit)

> How does "ruby.exe -v" describe?
> If it includes "x86-mswin32", then it is a 32bit executable.
> Else if includes "x64-mswin64", then a 64bit.
>


Ah-ha, it says; ruby 1.8.7 (2009-12-24 patchlevel 24
[i386-mswin32_100]
That's it!

> If your Tcl/Tk is 64bit and your compiler can make 64bit binaries,
> please try "--target=x64-mswin64" configure option.
> If your compiler can make 32bit binaries only, please download and
> install a 32bit version of ActiveTcl.


I installed the 32 bit versions but now having errors with the Microsoft
compiler. So dealing with that now.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Michael Fellinger wrote:
> On Wed, Jul 21, 2010 at 1:27 PM, Rich Leblanc <(E-Mail Removed)> wrote:
>>>>>
>>>
>>>>> My only hope? What about figuring out why it didn't work, fix the
>>>
>>>>
>>>> I downloaded 1.9.1p429 from http://rubyinstaller.org/downloads/

>>
>> parallel). As far as I know there is no "one-click installer" for that.
>> I need to know what goes where. Aren't there any install instructions
>> anywhere?

>
> gem install ffi-tk


I'm sorry I don't know what this means. Is this a command I'm supposed
to run from a Unix command line? A little more info please.

>
> That should work on any platform, be it 64bit, 32bit, windows, linux,
> MRI, or JRuby.
>
> The issue is that all existing tutorials are written with ruby-tk in
> mind,


that's fine, that's what I'm trying to learn.

some of the API is different.

I don't know what you mean. Elaborate, more than a one-liner please.


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

 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Hidetoshi NAGAI wrote:
> From: Rich Leblanc <(E-Mail Removed)>
> Subject: Re: LoadError: no such file to load -- tk
> Date: Wed, 21 Jul 2010 15:03:41 +0900
> Message-ID: <(E-Mail Removed)>
>> Actually I would like to get this fixed on my Unix machine too. I'm
>> getting this same error. I have tcl8.5.8 installed and Ruby 1.8.7. How
>> can I get it to work on Unix? Maybe if I get that working I'll

>
> Please tell me the directories of your Tcl/Tk headers/libraries, and
> configure options which you gave at first step of compiling.
> 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
run; tclsh85 I get tcl prompt. Then if i type; info patchlevel it shows;
8.5.8.

Now I go to usr\ports\lang\ruby18 and run; make install clean. This
installs ruby 1.8. If I type; ruby -v at the command line I get:

ruby 1.8.7 (2009-12-24 patchlevel 24 [amd64-freebsd8]

If I start irb and type; require 'tk' I get the error:
LoadError: no such file to load -- tk

Everything is in default locations. Ruby and tcl executables are in
\usr\local\bin. I don't know where the installer put anything else.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Roger Pack wrote:
>
>>>> http://faithpromotingrumors.org/inco...386-mingw32.7z

>
>> Ok I've unzipped this thing now how do I install it? And what would I do
>> if you didn't make me this? I'd really like to get the original problem
>> fixed and figure out how to get the 1.8.x source compiled and working as
>> in that tutorial. I'd like to know how to get the proper files in the
>> right place and understand what I'm doing not "click one button and have
>> it magically work".

>
> You don't need to install it, just cd into the
> "ruby-1.9.1-p429-i386-mingw32\bin" directory and run ruby/irb or what
> not (or add that folder to your PATH).


Ok, gotcha. did that.

>
>
>> I don't want to start getting sidetracked. How can I build the 1.8.x
>> source properly with tk and avoid this error? That was my original
>> question. I also need to get this working on my Unix machine next (or in
>> parallel). As far as I know there is no "one-click installer" for that.
>> I need to know what goes where. Aren't there any install instructions
>> anywhere?

>
> Unfortunately your original quest was to build ruby using VC with the Tk
> extension installed. I've never done that. The "main line" ruby
> installer has moved to mingw so almost *nobody* does that anymore.


Ok that's fine, so what are people doing now?


> You are treading in difficult waters and unless you want to tread alone, I
> would recommend going with a more standard approach. The directions in
> that tutorial are out of date. Why punish yourself?


I didn't know it was out of date. That's the one I always find when I
search for "ruby tutorial". I'd be happy to dump VC and go with mingw.

> Currently there isn't a one click distributable for 1.9 that has Tk, but
> it's in the works.
> If you want a one click distributable for 1.8 that
> has Tk, search the above threads for "RC2"


I really don't care if it's 1.8 or 1.9. I just want to do GUI
programming with ruby/tk.

It sounds like the options are:
1. compile tk into ruby 1.8 (with mingw)
2. use 1.8 one-click installer that has tk
3. Compile tk into 1.9.
4. Use the 1.9 you made me until a 1.9 one-click installer comes out
with tk.

Is there any reason to stick with 1.8? I only did because that tutorial
said to. If I should forget 1.8 and move to 1.9 that's fine I don't
care. I prefer to have the latest anyway.

>
> GL!
> -r


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

 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Rich Leblanc wrote:
> Roger Pack wrote:
>>
>>>>> http://faithpromotingrumors.org/inco...386-mingw32.7z

>>
>>> Ok I've unzipped this thing now how do I install it? And what would I do
>>> if you didn't make me this? I'd really like to get the original problem
>>> fixed and figure out how to get the 1.8.x source compiled and working as
>>> in that tutorial. I'd like to know how to get the proper files in the
>>> right place and understand what I'm doing not "click one button and have
>>> it magically work".

>>
>> You don't need to install it, just cd into the
>> "ruby-1.9.1-p429-i386-mingw32\bin" directory and run ruby/irb or what
>> not (or add that folder to your PATH).

>


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
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Charles Oliver Nutter
Guest
Posts: n/a
 
      07-22-2010
On Tue, Jul 20, 2010 at 11:08 PM, Michael Fellinger
<(E-Mail Removed)> wrote:
> gem install ffi-tk
>
> That should work on any platform, be it 64bit, 32bit, windows, linux,
> MRI, or JRuby.
>
> The issue is that all existing tutorials are written with ruby-tk in
> mind, some of the API is different.


Cool, I didn't know about this. How complete is it?

- Charlie

 
Reply With Quote
 
Michael Fellinger
Guest
Posts: n/a
 
      07-22-2010
On Thu, Jul 22, 2010 at 2:44 PM, Charles Oliver Nutter
<(E-Mail Removed)> wrote:
> On Tue, Jul 20, 2010 at 11:08 PM, Michael Fellinger
> <(E-Mail Removed)> wrote:
>> gem install ffi-tk
>>
>> That should work on any platform, be it 64bit, 32bit, windows, linux,
>> MRI, or JRuby.
>>
>> The issue is that all existing tutorials are written with ruby-tk in
>> mind, some of the API is different.

>
> Cool, I didn't know about this. How complete is it?


It's complete, covers all of the tk API. It's the same project I
mentioned a few months ago in IRC.
Haven't tried all the functionality recently on JRuby, but it should
with --1.9 for most things.

--
Michael Fellinger
CTO, The Rubyists, LLC
I check email a couple times daily; to reach me sooner, use:
http://awayfind.com/manveru

 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Rich Leblanc wrote:
> Rich Leblanc wrote:
>> Roger Pack wrote:
>>>
>>>>>> http://faithpromotingrumors.org/inco...386-mingw32.7z
>>>
>>>> Ok I've unzipped this thing now how do I install it? And what would I do
>>>> if you didn't make me this? I'd really like to get the original problem
>>>> fixed and figure out how to get the 1.8.x source compiled and working as
>>>> in that tutorial. I'd like to know how to get the proper files in the
>>>> right place and understand what I'm doing not "click one button and have
>>>> it magically work".
>>>
>>> You don't need to install it, just cd into the
>>> "ruby-1.9.1-p429-i386-mingw32\bin" directory and run ruby/irb or what
>>> not (or add that folder to your PATH).

>>

>
> 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.

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

 
Reply With Quote
 
Rich Leblanc
Guest
Posts: n/a
 
      07-22-2010
Rich Leblanc wrote:
> Rich Leblanc wrote:
>> Rich Leblanc wrote:
>>> Roger Pack wrote:
>>>>
>>>>>>> http://faithpromotingrumors.org/inco...386-mingw32.7z
>>>>
>>>>> Ok I've unzipped this thing now how do I install it? And what would I do
>>>>> if you didn't make me this? I'd really like to get the original problem
>>>>> fixed and figure out how to get the 1.8.x source compiled and working as
>>>>> in that tutorial. I'd like to know how to get the proper files in the
>>>>> right place and understand what I'm doing not "click one button and have
>>>>> it magically work".
>>>>
>>>> You don't need to install it, just cd into the
>>>> "ruby-1.9.1-p429-i386-mingw32\bin" directory and run ruby/irb or what
>>>> not (or add that folder to your PATH).
>>>

>>
>> 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.


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.


--
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
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