gems gone missing?

S

Sharon Phillips

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
 
J

Jano Svitok

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

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

J.
 
S

Sharon Phillips

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
 
J

Jano Svitok

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.
 
S

Sharon Phillips

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.
 
G

Gregory Brown

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?
 
G

Gregory Brown

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

For example
You can do it by....


Bar is easy...

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

Michael Glaesemann

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.

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
 
N

Nobuyoshi Nakada

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top