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?
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’.
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.
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’.
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
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.