# No such file to load --- fox 16

**URL:** <https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744>\
**Category:** Ruby\
**Created:** [November 9, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744 "2007-11-09T21:45:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 9, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/1 "2007-11-09T21:45:59Z")

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

---

<div class="post-metadata">

**Author:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 9, 2007, 10:56pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/2 "2007-11-09T22:56:11Z")

</div>

On Nov 9, 2007 2:45 PM, Hari P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

Todd

---

<div class="post-metadata">

**Author:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 10, 2007, 12:49am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/3 "2007-11-10T00:49:37Z")

</div>

On 11/9/07, Todd B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > LoadError: no such file to load – fox16  
> > Gems are for requiring, files are for loading, and trix are for kids 🙂
> 
> Try require instead of load…
> 
> require ‘fox16’

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

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 10, 2007, 2:46am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/4 "2007-11-10T02:46:34Z")

</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:  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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  
from (irb):1:in `load’  
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:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 10, 2007, 2:38am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/5 "2007-11-10T02:38:23Z")

</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  
from (irb):1:in `load’  
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.

---

<div class="post-metadata">

**Author:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 10, 2007, 3:34am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/6 "2007-11-10T03:34:29Z")

</div>

On Nov 9, 2007 8:29 PM, Todd B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 10, 2007, 3:29am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/7 "2007-11-10T03:29:48Z")

</div>

On Nov 9, 2007 7:45 PM, Joel VanderWerf [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

---

<div class="post-metadata">

**Author:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 10, 2007, 9:42am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/8 "2007-11-10T09:42:33Z")

</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 B.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote in message  
news:removed\_email\_address@domain.invalid…

---

<div class="post-metadata">

**Author:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 11, 2007, 1:10pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/9 "2007-11-11T13:10:56Z")

</div>

thanks Joel, it worked.  
regards  
hari

“Joel VanderWerf” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote in message  
news:removed\_email\_address@domain.invalid…

---

<div class="post-metadata">

**Author:** ![Hari\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@Hari\_P](https://www.ruby-forum.com/u/Hari_P)\
**Post date:** [November 10, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-fox-16/119744/10 "2007-11-10T21:06:53Z")

</div>

Hari P. wrote:

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