Prev: Music Theory (#229)
Next: Rdoc hosting?
From: Fresh Mix on 1 Mar 2010 16:56 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/.
From: Fresh Mix on 1 Mar 2010 18:04 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/.
From: Wybo Dekker on 1 Mar 2010 18:15 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
From: Joshua Kolden on 1 Mar 2010 18:28 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/.
From: Eric Hodel on 1 Mar 2010 19:30
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. |