# Please help!

**URL:** <https://www.ruby-forum.com/t/please-help/184396>\
**Category:** Ruby\
**Created:** [March 1, 2010, 10:56pm UTC](https://www.ruby-forum.com/t/please-help/184396 "2010-03-01T22:56:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [March 1, 2010, 10:56pm UTC](https://www.ruby-forum.com/t/please-help/184396/1 "2010-03-01T22:56:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [March 2, 2010, 12:04am UTC](https://www.ruby-forum.com/t/please-help/184396/2 "2010-03-02T00:04:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [March 2, 2010, 12:16am UTC](https://www.ruby-forum.com/t/please-help/184396/3 "2010-03-02T00:16:13Z")

</div>

why not simply:

gem update

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [March 2, 2010, 1:36am UTC](https://www.ruby-forum.com/t/please-help/184396/4 "2010-03-02T01:36:25Z")

</div>

On Mar 1, 2010, at 15:28, Joshua K. 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.

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [March 2, 2010, 3:47pm UTC](https://www.ruby-forum.com/t/please-help/184396/5 "2010-03-02T15:47:00Z")

</div>

Eric H. wrote:

> On Mar 1, 2010, at 15:28, Joshua K. 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.

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [March 2, 2010, 12:27am UTC](https://www.ruby-forum.com/t/please-help/184396/6 "2010-03-02T00:27:45Z")

</div>

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
