Forum: Ruby gems gone missing?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D86ec78a7a258246684d15e09e51a170?d=identicon&s=25 Sharon Phillips (Guest)
on 2007-06-25 16:23
(Received via mailing list)
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
97550977337c9f0a0e1a9553e55bfaa0?d=identicon&s=25 Jano Svitok (Guest)
on 2007-06-25 16:32
(Received via mailing list)
On 6/25/07, Sharon Phillips <phillipsds@yahoo.co.uk> 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.
D86ec78a7a258246684d15e09e51a170?d=identicon&s=25 Sharon Phillips (Guest)
on 2007-06-25 16:49
(Received via mailing list)
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
97550977337c9f0a0e1a9553e55bfaa0?d=identicon&s=25 Jano Svitok (Guest)
on 2007-06-25 17:01
(Received via mailing list)
On 6/25/07, Sharon Phillips <phillipsds@yahoo.co.uk> 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.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2007-06-25 17:06
(Received via mailing list)
On 6/25/07, Jano Svitok <jan.svitok@gmail.com> wrote:
<snip long unrelated text>
>
> 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. :)
D86ec78a7a258246684d15e09e51a170?d=identicon&s=25 Sharon Phillips (Guest)
on 2007-06-26 00:26
(Received via mailing list)
On 26/06/2007, at 1:05 AM, Gregory Brown wrote:

> On 6/25/07, Jano Svitok <jan.svitok@gmail.com> wrote:
> <snip long unrelated text>
>>
>> 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. :)

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.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2007-06-26 00:39
(Received via mailing list)
On 6/25/07, Sharon Phillips <phillipsds@yahoo.co.uk> 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?
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2007-06-26 00:42
(Received via mailing list)
On 6/25/07, Gregory Brown <gregory.t.brown@gmail.com> wrote:
> On 6/25/07, Sharon Phillips <phillipsds@yahoo.co.uk> 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.
Ae82cad40a0caca9c932d45c7a9eb3cd?d=identicon&s=25 Michael Glaesemann (Guest)
on 2007-06-26 02:17
(Received via mailing list)
On Jun 25, 2007, at 17:39 , Gregory Brown 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 Glaesemann
grzm seespotcode net
F1d6cc2b735bfd82c8773172da2aeab9?d=identicon&s=25 Nobuyoshi Nakada (Guest)
on 2007-06-26 10:07
(Received via mailing list)
Hi,

At Tue, 26 Jun 2007 07:25:49 +0900,
Sharon Phillips 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.
This topic is locked and can not be replied to.