Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > gems not recognized -- can't fake fox14

Reply
Thread Tools

gems not recognized -- can't fake fox14

 
 
bwv549
Guest
Posts: n/a
 
      11-10-2005
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.

 
Reply With Quote
 
 
 
 
Lyle Johnson
Guest
Posts: n/a
 
      11-10-2005
On 11/10/05, bwv549 <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
 
bwv549
Guest
Posts: n/a
 
      11-11-2005
That was it! Thanks a bunch!

 
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
Gems installed to $HOME not recognized Albert Schlef Ruby 2 04-13-2010 11:04 AM
Gems -- #include <gems.hpp> Tomás C++ 7 03-05-2006 02:48 PM
'private' gems/gems hierarchy Dany Cayouette Ruby 3 11-25-2005 10:55 PM
Confusion about gems and non-gems working together. Lloyd Zusman Ruby 3 06-20-2005 11:23 PM



Advertisments