Rubygems Problems

Hello all,

Is anyone else having problems with Rubygems? I'm running Ubuntu 8.10
with Ruby version 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]. I have
Rubygems 1.3.1 installed from source, and when I run gem -v I get the
expected '1.3.1' printout. However, if I try to run a Ruby app that
calls for "require 'rubygems'" then "require '<some gem>'", I get the
following, no matter what gem I ask for:

/usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:96:in
`lib_dirs_for': undefined method `join' for nil:NilClass (NoMethodError)
  from /usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:26:in
`initialize'
  from /usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:25:in
`each'
  from /usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:25:in
`initialize'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:684:in `new'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:684:in `searcher'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:683:in `synchronize'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:683:in `searcher'
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:34:in
`require'
  from system.rb:2

If I try it without the "require 'rubygems'", I get a 'no such file to
load -- <some gem> (LoadError)', so I know "require 'rubygems'" is
*somewhat* working...

Anyone else having this same issue?

···

--
Thanks!
Bryan
--
Posted via http://www.ruby-forum.com/.

Bryan Richardson wrote:

Hello all,

Is anyone else having problems with Rubygems?

Yes. The forum is full of posts about ruby gems problems this week. I
suggest you post the output of:

$ gem env

···

--
Posted via http://www.ruby-forum.com/\.

7stud -- wrote:

Yes. The forum is full of posts about ruby gems problems this week. I
suggest you post the output of:

$ gem env

Thanks 7stud, here's what you asked for:

foo@bar:~$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
  - INSTALLATION DIRECTORY: /home/foo/.gems
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /home/foo/.gems/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /home/foo/.gems
     - /var/lib/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gempath" => ["/home/foo/.gems", "/var/lib/gems/1.8"]
     - :sources => ["RubyGems.org | your community gem host,
"http://gems.github.com"]
     - "gemhome" => "/home/foo/.gems"
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/
     - http://gems.github.com

I'll continue searching the forums to see how other people have fixed
their problems.

···

--
Thanks!
Bryan
--
Posted via http://www.ruby-forum.com/\.

the update to mojombo-grit is the problem. Here is Aslax Hellesoy response
to my inquiry on the rubygems mailing list

I did a gem cleanup and since then I have been getting the following error
whenever I try to use a gem

I had the same problem yesterday, when I upgraded all my gems. It turns out,
this error occurs if you have one broken gem.
My solution: Add a puts statement inside gem_path_searcher.rb to find out
what gem is broken. Then uninstall it. (For me it was the latest
mojombo-grit).

And here is the result of the puts

#<Gem::Specification name=mofo version=0.2.16>
#<Gem::Specification name=mojombo-grit version=1.1.0>
load error: C:/Documents and Settings/dominic e sisneros/.irbrc
NoMethodError: undefined method `join' for nil:NilClass

···

2009/3/31 Dominic Sisneros <dsisnero@gmail.com>

the update to mojombo-grit is the problem. Here is Aslax Hellesoy response
to my inquiry on the rubygems mailing list

> I did a gem cleanup and since then I have been getting the following error
> whenever I try to use a gem

I had the same problem yesterday, when I upgraded all my gems. It turns out,
this error occurs if you have one broken gem.

I've tried to duplicate this but I can't. I installed grit 1.0.0, then
grit 1.1.0, then ran "gem clean", then fired up irb and loaded a gem.
I didn't have any problems.

I'm curious in what way the gem is broken. The require_paths appears
to just be set to 'lib', which is fine.

My solution: Add a puts statement inside gem_path_searcher.rb to find out
what gem is broken. Then uninstall it. (For me it was the latest
mojombo-grit).

And here is the result of the puts

#<Gem::Specification name=mofo version=0.2.16>
#<Gem::Specification name=mojombo-grit version=1.1.0>
load error: C:/Documents and Settings/dominic e sisneros/.irbrc

This is interesting, and might be a clue as to the real problem. Could
spaces in the path name be an issue? I'm not sure. What does
your .irbc file look like? Also, do you have any non-ascii characters
in the path to the .irbc file?

NoMethodError: undefined method `join' for nil:NilClass

Looks like spec.require_paths is returning nil, which is very odd.
Like I said, I can't duplicate this, and I'm not sure how that could
happen.

Regards,

Dan

···

On Mar 31, 8:57 am, Dominic Sisneros <dsisn...@gmail.com> wrote:

2009/3/31 Dominic Sisneros <dsisn...@gmail.com>

I am getting the exact same NoMethodError having to do with calling
'join' on a nil class. I'm on a linux machine with no spaces in path
names. I haven't had a chance to try printing stuff out in Rubygems
yet...

···

On 3/31/09, Daniel Berger <djberg96@gmail.com> wrote:

On Mar 31, 8:57 am, Dominic Sisneros <dsisn...@gmail.com> wrote:

the update to mojombo-grit is the problem. Here is Aslax Hellesoy
response
to my inquiry on the rubygems mailing list

2009/3/31 Dominic Sisneros <dsisn...@gmail.com>

> I did a gem cleanup and since then I have been getting the following
> error
> whenever I try to use a gem

I had the same problem yesterday, when I upgraded all my gems. It turns
out,
this error occurs if you have one broken gem.

I've tried to duplicate this but I can't. I installed grit 1.0.0, then
grit 1.1.0, then ran "gem clean", then fired up irb and loaded a gem.
I didn't have any problems.

I'm curious in what way the gem is broken. The require_paths appears
to just be set to 'lib', which is fine.

My solution: Add a puts statement inside gem_path_searcher.rb to find out
what gem is broken. Then uninstall it. (For me it was the latest
mojombo-grit).

And here is the result of the puts

#<Gem::Specification name=mofo version=0.2.16>
#<Gem::Specification name=mojombo-grit version=1.1.0>
load error: C:/Documents and Settings/dominic e sisneros/.irbrc

This is interesting, and might be a clue as to the real problem. Could
spaces in the path name be an issue? I'm not sure. What does
your .irbc file look like? Also, do you have any non-ascii characters
in the path to the .irbc file?

NoMethodError: undefined method `join' for nil:NilClass

Looks like spec.require_paths is returning nil, which is very odd.
Like I said, I can't duplicate this, and I'm not sure how that could
happen.

Regards,

Dan

If you figure out which gem is doing it, please send the gemspec from the specifications/ dir and a tarball of the gem from the gems/ dir.

···

On Mar 31, 2009, at 13:32, Bryan Richardson wrote:

On 3/31/09, Daniel Berger <djberg96@gmail.com> wrote:

On Mar 31, 8:57 am, Dominic Sisneros <dsisn...@gmail.com> wrote:

the update to mojombo-grit is the problem. Here is Aslax Hellesoy
response
to my inquiry on the rubygems mailing list

2009/3/31 Dominic Sisneros <dsisn...@gmail.com>

I did a gem cleanup and since then I have been getting the following
error
whenever I try to use a gem

I had the same problem yesterday, when I upgraded all my gems. It turns
out,
this error occurs if you have one broken gem.

I've tried to duplicate this but I can't. I installed grit 1.0.0, then
grit 1.1.0, then ran "gem clean", then fired up irb and loaded a gem.
I didn't have any problems.

I'm curious in what way the gem is broken. The require_paths appears
to just be set to 'lib', which is fine.

My solution: Add a puts statement inside gem_path_searcher.rb to find out
what gem is broken. Then uninstall it. (For me it was the latest
mojombo-grit).

And here is the result of the puts

#<Gem::Specification name=mofo version=0.2.16>
#<Gem::Specification name=mojombo-grit version=1.1.0>
load error: C:/Documents and Settings/dominic e sisneros/.irbrc

This is interesting, and might be a clue as to the real problem. Could
spaces in the path name be an issue? I'm not sure. What does
your .irbc file look like? Also, do you have any non-ascii characters
in the path to the .irbc file?

NoMethodError: undefined method `join' for nil:NilClass

Looks like spec.require_paths is returning nil, which is very odd.
Like I said, I can't duplicate this, and I'm not sure how that could
happen.

I am getting the exact same NoMethodError having to do with calling
'join' on a nil class. I'm on a linux machine with no spaces in path
names. I haven't had a chance to try printing stuff out in Rubygems
yet...

Looks like it was mojombo-grit version 1.1.0. I uninstalled
mojombo-grit, then tested and rubygems worked fine. I then re-installed
it, and it installed version 1.1.1 (must have been released today since
I first installed mojombo-grit yesterday and I got 1.1.0). Works just
fine now too, so version 1.1.1 must have fixed it.

···

--
Thanks!
Bryan
--
Posted via http://www.ruby-forum.com/.

Bryan Richardson wrote:

Looks like it was mojombo-grit version 1.1.0. I uninstalled
mojombo-grit, then tested and rubygems worked fine. I then re-installed
it, and it installed version 1.1.1 (must have been released today since
I first installed mojombo-grit yesterday and I got 1.1.0). Works just
fine now too, so version 1.1.1 must have fixed it.

The only difference between the 1.1.0 and 1.1.1 Gems is this commit,
which apparently fixes the issue:

  <https://GitHub.Com/Mojombo/Grit/commit/4ac4acab7fd9c7fd4c0e0f4ff5794b0347baecde&gt;

Now, I ain't no RubyGems expert, but if there's anything in the Grit
Gem that could break RubyGems, my money would be on that 90000
characters s.files attribute.

However, the test files have already been added to the Gem in version
1.0.0 in January, in this commit, which, apparently, worked fine:

  <https://GitHub.Com/Mojombo/Grit/commit/518385c5afba53957332119dd9fdf4980a779d6f&gt;

The last relevant change was this commit:

  <https://GitHub.Com/Mojombo/Grit/commit/ac8700fe97702bc13806a5bfea7a0e28f97b5f6b&gt;

Which is probably the culprit.

jwm