Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gems not recognized -- can't fake fox14

12 views
Skip to first unread message

bwv549

unread,
Nov 10, 2005, 3:40:54 PM11/10/05
to
Some gems, after installation, cannot be found with a "require
<whatever_gem>" statement. Perhaps this is specific to my ruby
install, but I am not sure.

I installed gnuplot.rb and it was not found with a require statement.
So, I made a soft link:
ln -s /usr/local/lib/ruby/gems/1.8/gems/gnuplot-2.1/lib/gnuplot.rb
/usr/local/lib/ruby/site_ruby/1.8/gnuplot.rb

and that solved the problem for gnuplot, although in a somewhat
unsatisfying way.

Now, I installed fxruby with no problems, but again, I try to 'require
fox14' and it fails:
-e:1:in `require': No such file to load -- fox14 (LoadError)

This time, making a soft link to the fox14 directory does NOT fix the
problem:
ln -s /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.4.3/lib/fox14
/usr/local/lib/ruby/site_ruby/1.8/fox14

The output of "ruby -e 'p $LOAD_PATH'" is:
["/usr/local/lib/ruby/site_ruby/1.8",
"/usr/local/lib/ruby/site_ruby/1.8/i686-linux",
"/usr/local/lib/ruby/site_ruby", "/usr/local/lib/ruby/1.8",
"/usr/local/lib/ruby/1.8/i686-linux", "."]
(I am running Mandriva 2005 LE)

Is there a way to permanently add the gems folder to $LOAD_PATH?
Does a require statement have to point to a *.rb file, or can it point
to the directory?

Thank You.

Lyle Johnson

unread,
Nov 10, 2005, 3:57:25 PM11/10/05
to
On 11/10/05, bwv549 <jtpr...@gmail.com> wrote:

> Some gems, after installation, cannot be found with a "require
> <whatever_gem>" statement. Perhaps this is specific to my ruby
> install, but I am not sure.

<snip>

Have you set your RUBYOPT environment variable to include the
"-rubygems" flag? See the comments here:

http://docs.rubygems.org/read/chapter/3#page70

Hope this helps,

Lyle


bwv549

unread,
Nov 11, 2005, 5:47:56 PM11/11/05
to
That was it! Thanks a bunch!

0 new messages