Please help!

F

Fresh Mix

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
 
F

Fresh Mix

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
 
W

Wybo Dekker

why not simply:

gem update

Fresh said:
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
 
J

Joshua Kolden

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
 
E

Eric Hodel

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

Yaroslav Markin

Eric said:
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.
 

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

No members online now.

Forum statistics

Threads
474,039
Messages
2,570,376
Members
47,028
Latest member
IsmaelLans

Latest Threads

Top