Gems gone missing?

Hi,

I’ve just spent the evening installing gruff (all the way from step
1: install X11…), but now any ruby code I have that uses a gem
can’t seem to find it.

For example,
irb(main):001:0> require ‘net-ssh’
LoadError: no such file to load – net-ssh
from (irb):1:in `require’
from (irb):1

gem list lists all the gems I expect to be present, including gruff
and net-ssh (which is one I know was working beforehand)

Only thing I can think of that may have contributed to this is
combining two .profile files into one, now ~/.profile (most of this
is new to me). Could the one I removed (contents moved to the new
one) have had a path to the gems, and Ruby doesn’t read the new one?

Any other ideas. I feel right stupid at the moment.

Cheers,
Dave

On 6/25/07, Sharon P. [email protected] wrote:

            from (irb):1

Cheers,
Dave

Check your $RUBYOPT setting, use -rubygems argument to ruby, or add
'require “rubygems” ’ to the beginning of the file.

J.

Thanks for the help Jano,

Not sure where to find $RUBYOPT, but adding require ‘rubygems’ solves
the problem temporarily. I now have my very first gruff graph!
Does this give any clue as to the underlying issue?

Cheers,
Dave

On 6/25/07, Sharon P. [email protected] wrote:

    irb(main):001:0> require 'net-ssh'

one) have had a path to the gems, and Ruby doesn’t read the new one?

Thanks for the help Jano,

Not sure where to find $RUBYOPT, but adding require ‘rubygems’ solves
the problem temporarily. I now have my very first gruff graph!
Does this give any clue as to the underlying issue?

Cheers,
Dave

  1. Please bottom-post.
  2. The problem is that in order to use a gem, rubygems must be loaded.
    You can achieve that by any of the means I mentioned above. (If
    rubygems are loaded, and the gem is not there, the message looks
    different.
  3. the means to load rubygems in detail:
  • require ‘rubygems’ is pretty obvious I think.
  • ruby -rubygems uses -r switch to ruby, that requires ‘ubygems’
    before running the script.
    ubygems just contains require ‘rubygems’ - it’s a cosmetic hack to
    avoid having to write -r rubygems or -rrubygems
  • RUBYOPT environment variable contains default arguments to ruby. If
    you set it to ‘rubygems’ they will be loaded for all ruby scripts.

J.

On 6/25/07, Jano S. [email protected] wrote:

  1. Please bottom-post.

It is good to remind people not to top post, but it helps if you do it
correctly by trimming for context. :slight_smile:

On 26/06/2007, at 1:05 AM, Gregory B. wrote:

On 6/25/07, Jano S. [email protected] wrote:

  1. Please bottom-post.

It is good to remind people not to top post, but it helps if you do it
correctly by trimming for context. :slight_smile:

Is their any particular reason for bottom posting (please excuse my
lack of knowledge regarding email etiquette)?
I find top posting means I can skip through the list of new mails and
easily read any new comments. Bottom posing means for each long mail,
I have to scroll down to the bottom to read.
Posts trimmed of excess fat, so the new text is readable without
scrolling, are good though.

On 6/25/07, Sharon P. [email protected] wrote:

Is their any particular reason for bottom posting (please excuse my
lack of knowledge regarding email etiquette)?
I find top posting means I can skip through the list of new mails and
easily read any new comments. Bottom posing means for each long mail,
I have to scroll down to the bottom to read.

A. Yes.
Q. Is there any good reason for top posting?

If that doesn’t read unnaturally to you, then it boils down to a
matter of preference. However, most mailing lists are somewhat
standardized to bottom post. When you mix the two styles, it gets
very messy.

Also, many threads become multi-branch and involve many posters. It
makes it easier to read a subset of the entire thread when it reads
like written english normally does (top to bottom), rather than
reading from the bottom up, email by email.

Most mail clients will let you fold quoted text. What are you using?

On 6/25/07, Gregory B. [email protected] wrote:

On 6/25/07, Sharon P. [email protected] wrote:

I find top posting means I can skip through the list of new mails and
easily read any new comments. Bottom posing means for each long mail,
I have to scroll down to the bottom to read.

I forgot to mention this before. For long posts, people usually
inline comments rather than strictly bottom post.

For example

How can I do foo?

You can do it by…

How can I do bar?

Bar is easy…

This is preferred whenever you can break an email into several points.

Hi,

At Tue, 26 Jun 2007 07:25:49 +0900,
Sharon P. wrote in [ruby-talk:256975]:

Is their any particular reason for bottom posting (please excuse my
lack of knowledge regarding email etiquette)?
I find top posting means I can skip through the list of new mails and
easily read any new comments. Bottom posing means for each long mail,
I have to scroll down to the bottom to read.
Posts trimmed of excess fat, so the new text is readable without
scrolling, are good though.

In common, you should not cite whole body. Then, you don’t
need to scroll so much.

On Jun 25, 2007, at 17:39 , Gregory B. wrote:

If that doesn’t read unnaturally to you, then it boils down to a
matter of preference. However, most mailing lists are somewhat
standardized to bottom post. When you mix the two styles, it gets
very messy.

It also makes it easier to catch up on the thread if you haven’t been
following it from the beginning, or are reading the archives.

Michael G.
grzm seespotcode net