/usr/local/lib/site_ruby/1.8/rubygems/gem_path_searcher.rb:95:in lib_dirs_for': undefined methodjoin’ 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:ineach’
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:innew’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:839:in searcher' from /usr/local/lib/site_ruby/1.8/rubygems.rb:838:insynchronize’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:838:in searcher' from /usr/local/lib/site_ruby/1.8/rubygems.rb:478:infind_files’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1103
from /usr/bin/gem:8:in `require’
from /usr/bin/gem:8
./lib/rubygems/gem_path_searcher.rb:95:in lib_dirs_for': undefined methodjoin’ for “.”:String (NoMethodError)
from ./lib/rubygems/gem_path_searcher.rb:20:in initialize' from ./lib/rubygems/gem_path_searcher.rb:19:ineach’
from ./lib/rubygems/gem_path_searcher.rb:19:in initialize' from ./lib/rubygems.rb:839:innew’
from ./lib/rubygems.rb:839:in searcher' from ./lib/rubygems.rb:838:insynchronize’
from ./lib/rubygems.rb:838:in searcher' from ./lib/rubygems.rb:478:infind_files’
from ./lib/rubygems.rb:1103
from setup.rb:24:in `require’
from setup.rb:24
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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.