# No such file to load --- fox 16

**URL:** <https://rubytalk.org/t/no-such-file-to-load-fox-16/42057>\
**Category:** ruby-talk\
**Created:** [9 November 2007 20:45 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057 "2007-11-09T20:45:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hari\_Pillai](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@Hari\_Pillai](https://rubytalk.org/u/Hari_Pillai)\
**Post date:** [9 November 2007 20:45 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/1 "2007-11-09T20:45:00Z")

</div>

Hi,  
I downloaded FxRuby via gem. The both direcories ,  
C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13-mswin32  
C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13  
exist in the correct location, but when I try to run it, I get the following  
error:-

C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13-mswin32\tests\>irb  
irb(main):001:0\> load 'fox16'  
LoadError: no such file to load -- fox16  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1:in `load'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1  
irb(main):002:0\> exit

Windows XP machine, Do I need to add any entries to as a path or anything  
specific to work with FXruby library please?

thanks  
Hari

---

<div class="post-metadata">

**Author:** ![Todd\_Benson](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@Todd\_Benson](https://rubytalk.org/u/Todd_Benson)\
**Post date:** [9 November 2007 21:55 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/2 "2007-11-09T21:55:33Z")

</div>

Gems are for requiring, files are for loading, and trix are for kids 🙂

Try require instead of load...

require 'fox16'

Todd

> **···**
>
> On Nov 9, 2007 2:45 PM, Hari Pillai \<Hari@pillai.co.uk\> wrote:
> 
> > Hi,  
> > I downloaded FxRuby via gem. The both direcories ,  
> > C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13-mswin32  
> > C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13  
> > exist in the correct location, but when I try to run it, I get the following  
> > error:-
> > 
> > C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13-mswin32\tests\>irb  
> > irb(main):001:0\> load 'fox16'  
> > LoadError: no such file to load -- fox16  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1:in `load'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1  
> > irb(main):002:0\> exit
> > 
> > Windows XP machine, Do I need to add any entries to as a path or anything  
> > specific to work with FXruby library please?
> > 
> > thanks  
> > Hari

---

<div class="post-metadata">

**Author:** ![Rick\_DeNatale1](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@Rick\_DeNatale1](https://rubytalk.org/u/Rick_DeNatale1)\
**Post date:** [9 November 2007 23:48 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/3 "2007-11-09T23:48:57Z")

</div>

No, if load won't work, require won't either. Require is just the  
same as load except that it checks to see if the file has been already  
loaded and doesn't reload it if so.

I suspect that the problem is that he needs to first require 'rubygems'.

> **···**
>
> On 11/9/07, Todd Benson \<caduceass@gmail.com\> wrote:
> 
> > On Nov 9, 2007 2:45 PM, Hari Pillai \<Hari@pillai.co.uk\> wrote:  
> > \> Hi,  
> > \> I downloaded FxRuby via gem. The both direcories ,  
> > \> C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13-mswin32  
> > \> C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13  
> > \> exist in the correct location, but when I try to run it, I get the following  
> > \> error:-  
> > \>  
> > \> C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13-mswin32\tests\>irb  
> > \> irb(main):001:0\> load 'fox16'  
> > \> LoadError: no such file to load -- fox16  
> > \> from (irb):1:in `load'  
> > \> from (irb):1  
> > \> irb(main):002:0\> exit  
> > \>  
> > \> Windows XP machine, Do I need to add any entries to as a path or anything  
> > \> specific to work with FXruby library please?  
> > \>  
> > \> thanks  
> > \> Hari
> > 
> > Gems are for requiring, files are for loading, and trix are for kids 🙂
> > 
> > Try require instead of load...
> > 
> > require 'fox16'
> 
> --  
> Rick DeNatale
> 
> My blog on Ruby  
> [http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![Joel\_VanderWerf1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Joel\_VanderWerf1](https://rubytalk.org/u/Joel_VanderWerf1)\
**Post date:** [10 November 2007 01:37 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/4 "2007-11-10T01:37:53Z")

</div>

Rick DeNatale wrote:

> No, if load won't work, require won't either. Require is just the  
> same as load except that it checks to see if the file has been already  
> loaded and doesn't reload it if so.

Not true, because load ignores $LOAD\_PATH:

irb(main):001:0\> load 'fox16'  
LoadError: no such file to load -- fox16  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1:in `load'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1  
irb(main):002:0\> require 'fox16'  
=\> true

> I suspect that the problem is that he needs to first require 'rubygems'.

Yep, that's a good thing to check.

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

---

<div class="post-metadata">

**Author:** ![Joel\_VanderWerf1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Joel\_VanderWerf1](https://rubytalk.org/u/Joel_VanderWerf1)\
**Post date:** [10 November 2007 01:45 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/5 "2007-11-10T01:45:42Z")

</div>

Joel VanderWerf wrote:

> Rick DeNatale wrote:
> 
> > No, if load won't work, require won't either. Require is just the  
> > same as load except that it checks to see if the file has been already  
> > loaded and doesn't reload it if so.
> 
> Not true, because load ignores $LOAD\_PATH:

&nbsp;&nbsp;&nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ignore that, it's quite wrong!

However, load doesn't automatically append the .rb:

irb(main):001:0\> load "fileutils"  
LoadError: no such file to load -- fileutils  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1:in `load'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1  
irb(main):002:0\> load "fileutils.rb"  
=\> true

That will certainly cause "load 'fox16'" to fail, regardless of the gem issue.

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

---

<div class="post-metadata">

**Author:** ![Todd\_Benson](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@Todd\_Benson](https://rubytalk.org/u/Todd_Benson)\
**Post date:** [10 November 2007 02:29 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/6 "2007-11-10T02:29:15Z")

</div>

Yes, I forgot about that. You need to load the full file name, but  
still, doesn't loading a gem load more than one file?

Todd

> **···**
>
> On Nov 9, 2007 7:45 PM, Joel VanderWerf \<vjoel@path.berkeley.edu\> wrote:
> 
> > Joel VanderWerf wrote:  
> > \> Rick DeNatale wrote:  
> > \>\> No, if load won't work, require won't either. Require is just the  
> > \>\> same as load except that it checks to see if the file has been already  
> > \>\> loaded and doesn't reload it if so.  
> > \>  
> > \> Not true, because load ignores $LOAD\_PATH:  
> > &nbsp;&nbsp;&nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > 
> > Ignore that, it's quite wrong!
> > 
> > However, load doesn't automatically append the .rb:
> > 
> > irb(main):001:0\> load "fileutils"  
> > LoadError: no such file to load -- fileutils  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1:in `load'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1  
> > irb(main):002:0\> load "fileutils.rb"  
> > =\> true
> > 
> > That will certainly cause "load 'fox16'" to fail, regardless of the gem  
> > issue.

---

<div class="post-metadata">

**Author:** ![Todd\_Benson](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@Todd\_Benson](https://rubytalk.org/u/Todd_Benson)\
**Post date:** [10 November 2007 02:33 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/7 "2007-11-10T02:33:46Z")

</div>

I meant "requiring a gem".

Todd

> **···**
>
> On Nov 9, 2007 8:29 PM, Todd Benson \<caduceass@gmail.com\> wrote:
> 
> > Yes, I forgot about that. You need to load the full file name, but  
> > still, doesn't loading a gem load more than one file?

---

<div class="post-metadata">

**Author:** ![Hari\_Pillai](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@Hari\_Pillai](https://rubytalk.org/u/Hari_Pillai)\
**Post date:** [10 November 2007 08:40 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/8 "2007-11-10T08:40:16Z")

</div>

HI,  
thanks for the feedback, by processing rubygems first and then fox it seems  
to work,

irb(main):003:0\> require 'rubygems'  
=\> true  
irb(main):004:0\> require 'fox16'  
=\> true

but all the examples which are downloaded with fox does not require this  
entry. Is there anything I need to add to to the path in windows to load  
gems automatically.  
How does this get loaded please?  
How does Load\_path work, where is defined and can I amend this.  
Appreciate your help

thanks & regards  
Hari

"Todd Benson" \<caduceass@gmail.com\> wrote in message  
news:eaeff8c10711091833o3e259bccobf30362fda52eb9@mail.gmail.com...

> **···**
>
> > On Nov 9, 2007 8:29 PM, Todd Benson \<caduceass@gmail.com\> wrote:
> > 
> > > Yes, I forgot about that. You need to load the full file name, but  
> > > still, doesn't loading a gem load more than one file?
> > 
> > I meant "requiring a gem".
> > 
> > Todd

---

<div class="post-metadata">

**Author:** ![Joel\_VanderWerf1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Joel\_VanderWerf1](https://rubytalk.org/u/Joel_VanderWerf1)\
**Post date:** [10 November 2007 20:05 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/9 "2007-11-10T20:05:49Z")

</div>

Hari Pillai wrote:

> HI,  
> thanks for the feedback, by processing rubygems first and then fox it seems to work,
> 
> irb(main):003:0\> require 'rubygems'  
> =\> true  
> irb(main):004:0\> require 'fox16'  
> =\> true
> 
> but all the examples which are downloaded with fox does not require this entry. Is there anything I need to add to to the path in windows to load gems automatically.  
> How does this get loaded please?  
> How does Load\_path work, where is defined and can I amend this.  
> Appreciate your help

Try setting an environment variable RUBYOPT="rubygems" in your system control panel.

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

---

<div class="post-metadata">

**Author:** ![Hari\_Pillai](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@Hari\_Pillai](https://rubytalk.org/u/Hari_Pillai)\
**Post date:** [11 November 2007 12:10 UTC](https://rubytalk.org/t/no-such-file-to-load-fox-16/42057/10 "2007-11-11T12:10:12Z")

</div>

thanks Joel, it worked.  
regards  
hari

"Joel VanderWerf" \<vjoel@path.berkeley.edu\> wrote in message  
news:47360F0F.8010300@path.berkeley.edu...

> **···**
>
> > Hari Pillai wrote:
> > 
> > > HI,  
> > > thanks for the feedback, by processing rubygems first and then fox it  
> > > seems  
> > > to work,
> > > 
> > > irb(main):003:0\> require 'rubygems'  
> > > =\> true  
> > > irb(main):004:0\> require 'fox16'  
> > > =\> true
> > > 
> > > but all the examples which are downloaded with fox does not require this  
> > > entry. Is there anything I need to add to to the path in windows to load  
> > > gems automatically.  
> > > How does this get loaded please?  
> > > How does Load\_path work, where is defined and can I amend this.  
> > > Appreciate your help
> > 
> > Try setting an environment variable RUBYOPT="rubygems" in your system  
> > control panel.
> > 
> > --  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
