Please help!

After "# gem update" I have problems:

# ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

# gem list
/usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:95:in
`lib_dirs_for': undefined method `join' for ".":String (NoMethodError)
  from /usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:20:in
`initialize'
  from /usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:19:in
`each'
  from /usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:19:in
`initialize'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:839:in `new'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:839:in `searcher'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:838:in `synchronize'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:838:in `searcher'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:478:in `find_files'
  from /usr/local/lib/site_ruby/1.8/rubygems.rb:1103
  from /usr/bin/gem:8:in `require'
  from /usr/bin/gem:8

···

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

even clean install not help

# gem -v
1.2.0

# gem list

*** LOCAL GEMS ***

rubygems-update (1.3.6)

# cd /var/lib/gems/1.8/bin

# ./update_rubygems
./lib/rubygems/gem_path_searcher.rb:95:in `lib_dirs_for': undefined
method `join' for ".":String (NoMethodError)
  from ./lib/rubygems/gem_path_searcher.rb:20:in `initialize'
  from ./lib/rubygems/gem_path_searcher.rb:19:in `each'
  from ./lib/rubygems/gem_path_searcher.rb:19:in `initialize'
  from ./lib/rubygems.rb:839:in `new'
  from ./lib/rubygems.rb:839:in `searcher'
  from ./lib/rubygems.rb:838:in `synchronize'
  from ./lib/rubygems.rb:838:in `searcher'
  from ./lib/rubygems.rb:478:in `find_files'
  from ./lib/rubygems.rb:1103
  from setup.rb:24:in `require'
  from setup.rb:24

···

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

why not simply:

gem update

Fresh Mix wrote:

···

even clean install not help

# gem -v
1.2.0

# gem list

*** LOCAL GEMS ***

rubygems-update (1.3.6)

# cd /var/lib/gems/1.8/bin

# ./update_rubygems
../lib/rubygems/gem_path_searcher.rb:95:in `lib_dirs_for': undefined method `join' for ".":String (NoMethodError)
  from ./lib/rubygems/gem_path_searcher.rb:20:in `initialize'
  from ./lib/rubygems/gem_path_searcher.rb:19:in `each'
  from ./lib/rubygems/gem_path_searcher.rb:19:in `initialize'
  from ./lib/rubygems.rb:839:in `new'
  from ./lib/rubygems.rb:839:in `searcher'
  from ./lib/rubygems.rb:838:in `synchronize'
  from ./lib/rubygems.rb:838:in `searcher'
  from ./lib/rubygems.rb:478:in `find_files'
  from ./lib/rubygems.rb:1103
  from setup.rb:24:in `require'
  from setup.rb:24

--
Wybo

I'm getting the same error.

On looking into the lib_dirs_for function in gem_path_searcher.rb I see
it's trying to do a join against spec.require_paths. Printing out the
values I see the last entry is "." not ["."] as it should be.
Presumably some gem has incorrectly set this value, but I don't know
which one where or how. I don't know enough about gems to solve it
myself. I put the following code in to try and get past this error:

def lib_dirs_for(spec)
    if(spec.require_paths.class == Array)
      value = spec.require_paths.join(',')
    else
      value = spec.require_paths
    end

    "#{spec.full_gem_path}/{#{value}}"
end

Which get's me past the error. I can run gem update, but no updates
have come down, which means no one has published the fix to the
offending gem yet.

Any more clues would be appreciated. Also if the author of the
offending gem would please step forward for your flogging.

Mr. Joshua

···

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

grep -r require_paths `gem env home`/specifications | grep -v \\[

Should help you locate it.

···

On Mar 1, 2010, at 15:28, Joshua Kolden wrote:

Any more clues would be appreciated. Also if the author of the
offending gem would please step forward for your flogging.

Eric Hodel wrote:

···

On Mar 1, 2010, at 15:28, Joshua Kolden wrote:

Any more clues would be appreciated. Also if the author of the
offending gem would please step forward for your flogging.

grep -r require_paths `gem env home`/specifications | grep -v \\[

Should help you locate it.

Having the same problem here.

Running `gem` with any parameters did not really help since it died
right away with the same exception.

The problem is caused by faulty gemspec of "unicode" gem (new version of
that gem was released not so long ago). Removed unicode gemspec and
gemcode, good as new.
--
Posted via http://www.ruby-forum.com/\.