Ticket #28551 (closed defect: fixed)
installing rb19 gems fails
| Reported by: | singingwolfboy@… | Owned by: | kimuraw@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.2 |
| Keywords: | Cc: | ||
| Port: | ruby19 |
Description
Every gem that I've tried to install for Ruby 1.9 has failed with the following stack trace:
/opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/source_index.rb:68:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError) from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/source_index.rb:58:in `from_installed_gems' from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:881:in `source_index' from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in `init_gemspecs' from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in `initialize' from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:839:in `new' from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:839:in `block in searcher' from <internal:prelude>:10:in `synchronize' from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:838:in `searcher' from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:478:in `find_files' from /opt/local/lib/ruby1.9/site_ruby/1.9.1/rubygems.rb:1103:in `<top (required)>' from <internal:lib/rubygems/custom_require>:29:in `require' from <internal:lib/rubygems/custom_require>:29:in `require' from /opt/local/bin/gem1.9:8:in `<main>'
Interesting that it's using the 1.9.1 directory:
masika:ports baumgold$ ruby1.9 --version ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10]
Note: See
TracTickets for help on using
tickets.


It seems the another rubygems is installed in your system.
ruby-1.9.2 built-in rubygems: ${prefix}/lib/ruby1.9/1.9.1/ rubygems.rb rubygems/ rubygems form other installation: ${prefix}/lib/ruby1.9/site_ruby/ rubygems.rb rubygems/The latter files are not needed for ruby-1.9.2 system. I think to delete rubygems files under the site_ruby directory solves your problem.