Project

General

Profile

Actions

Bug #3607

closed

[trunk/r28731] Gem.path has disappeared?

Added by roberto (Ollivier Robert) over 13 years ago. Updated almost 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-07-23) [x86_64-darwin10.4.0]
Backport:
[ruby-core:31459]

Description

=begin
Any attempt to use rubygems is failing there:

519 [15:51] roberto@roberto-al:yarv/build> /usr/local/bin/gem list
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:68:in installed_spec_directories': undefined method path' for Gem:Module (NoMethodError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:58:in from_installed_gems' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:881:in source_index'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in init_gemspecs' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in initialize'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:839:in new' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:839:in block in searcher'
from internal:prelude:10:in synchronize' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:838:in searcher'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:478:in find_files' from /usr/local/lib/ruby/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 /usr/local/bin/gem:8:in `'

I have tried rmoving my build directory and rebuild everything. I don't want to blow everythting away in /usr/local/lib/ruby because I have quite a few gems installed if possible.
=end

Actions #1

Updated by jonforums (Jon Forums) over 13 years ago

=begin
We -- RubyInstaller for Windows project http://rubyinstaller.org/ -- appear to be seeing the same failure

http://groups.google.com/group/rubyinstaller/browse_thread/thread/66df81c7737fcab3

when attempting to build with Ruby trunk (ruby 1.9.3dev (2010-07-23 trunk 28731) [i386-mingw32]) and the latest pull from the RubyGems GitHub master branch.

While we have a patch to our build recipes that allows us to build Ruby with RubyGems in site_ruby, executing "gem list" or "gem env" with the freshly built Ruby causes us the same reported failure.

We're we're still trying to identify root cause, the failure doesn't appear to be a regression in our build recipes.

Jon
=end

Actions #2

Updated by roberto (Ollivier Robert) over 13 years ago

=begin
I can confirm that out-of-the-box (from branches/1.9.2), Gem#path still exists:

343 [17:35] roberto@roberto-al:ruby-1.9.2/build> ./ruby -I../lib
print Gem.methods
[:dir, :path, :post_install, :post_uninstall, :pre_install, :pre_uninstall, :set_home, :set_paths, :user_home, :default_sources, :default_dir, :user_dir, :default_path, :default_exec_format, :default_bindir, :default_system_source_cache_dir, :default_user_source_cache_dir, :ruby_engine, :push_gem_version_on_load_path, :integers_for, :push_all_highest_version_gems_on_load_path, :const_missing, ...
]%
343 [17:36] roberto@roberto-al:ruby-1.9.2/build>

=end

Actions #3

Updated by rogerdpack (Roger Pack) over 13 years ago

=begin
I think this is fixed in trunk could you try it there?
=end

Actions #4

Updated by roberto (Ollivier Robert) over 13 years ago

=begin
@Roger: nope, not fixed at r28758.
=end

Actions #5

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Status changed from Open to Rejected

=begin
Uninstall old rubygems from site_ruby.
=end

Actions #6

Updated by roberto (Ollivier Robert) over 13 years ago

=begin
Nakada-san, thanks. Fixed it. Weird it didn't clash before.
=end

Actions #7

Updated by jonforums (Jon Forums) over 13 years ago

=begin
@Roger: I still see the failure listed below after building 28759 this morning

C:\Users\Jon\Documents\RubyDev>ruby --version
ruby 1.9.3dev (2010-07-26 trunk 28759) [i386-mingw32]

@nobu (Nobuyoshi Nakada): I don't think an old rubygems in site_ruby is at fault for the error I'm seeing. Our "edge" build recipes check out a fresh rubygems into site_ruby via "git checkout master && git pull". What else would you like me to try? Should I open a new bug report?

*** ERROR MESSAGE ***
C:\Users\Jon\Documents\RubyDev>gem list
C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:68:in installed_spec_directories': undefined method path' for Gem:Module (NoMethodError)
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:58:in from_installed_gems' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:883:in source_index'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in init_gemspecs' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in initialize'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:841:in new' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:841:in block in searcher'
from internal:prelude:10:in synchronize' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:840:in searcher'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:479:in find_files' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:983:in load_plugins'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:1139:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:in require'
from internal:lib/rubygems/custom_require:29:in require' from C:/ruby19trunk/bin/gem:8:in '
=end

Actions #8

Updated by jonforums (Jon Forums) over 13 years ago

=begin
Out of curiosity I just built 28760 with and without raggi's rubygems perflude branch http://github.com/rubygems/rubygems/compare/master...perflude and got the following failures in both.

Anyone else able to duplicate this on either *nix or Windows?

*** 28760 + RubyGems perflude ERROR ***
C:\Users\Jon\Documents\RubyDev>ruby --version
ruby 1.9.3dev (2010-07-26 trunk 28760) [i386-mingw32]

C:\Users\Jon\Documents\RubyDev>gem list
C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:62:in installed_spec_directories': undefined method path' for Gem:Module (NoMethodError)
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:52:in from_installed_gems' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:868:in source_index'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in init_gemspecs' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in initialize'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:827:in new' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:827:in searcher'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:468:in find_files' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:968:in load_plugins'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/plugins.rb:5:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:in require'
from internal:lib/rubygems/custom_require:29:in require' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:183:in <top (required)>'
from internal:lib/rubygems/custom_require:29:in require' from <internal:lib/rubygems/custom_require>:29:in require'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:7:in <top(required)>' from <internal:lib/rubygems/custom_require>:29:in require'
from internal:lib/rubygems/custom_require:29:in require' from C:/ruby19trunk/bin/gem:9:in '

*** 28760 + RubyGems master ERROR ***
[C:\Users\Jon\Documents\RubyDev]ruby --version
ruby 1.9.3dev (2010-07-26 trunk 28760) [i386-mingw32]

[C:\Users\Jon\Documents\RubyDev]gem list
C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:68:in installed_spec_directories': undefined method path' for Gem:Module (NoMethodError)
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:58:in from_installed_gems' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:883:in source_index'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in init_gemspecs' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in initialize'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:841:in new' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:841:in block in searcher'
from internal:prelude:10:in synchronize' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:840:in searcher'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:479:in find_files' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:983:in load_plugins'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:1139:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:in require'
from internal:lib/rubygems/custom_require:29:in require' from C:/ruby19trunk/bin/gem:8:in '
=end

Actions #9

Updated by jonforums (Jon Forums) over 13 years ago

=begin
I do not see the error on the 1.9.2 branch as of a freshly built Ruby 28749 using a fresh checkout of RubyGems master...

C:\Users\Jon\Documents\RubyDev>ruby --version
ruby 1.9.2dev (2010-07-24 revision 28749) [i386-mingw32]

C:\Users\Jon\Documents\RubyDev>gem list

*** LOCAL GEMS ***

minitest (1.6.0)
rake (0.8.7)
rdoc (2.5.8)

C:\Users\Jon\Documents\RubyDev>gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.7
  • RUBY VERSION: 1.9.2 (2010-07-24 patchlevel -1) [i386-mingw32]
  • INSTALLATION DIRECTORY: C:/ruby192dev/lib/ruby/gems/1.9.1
  • RUBY EXECUTABLE: C:/ruby192dev/bin/ruby.exe
  • EXECUTABLE DIRECTORY: C:/ruby192dev/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-mingw32
  • GEM PATHS:
    • C:/ruby192dev/lib/ruby/gems/1.9.1
    • C:/Users/Jon/.gem/ruby/1.9.1
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
    • :sources => ["http://rubygems.org", "http://gemcutter.org"]
    • "gem" => "--no-ri --no-rdoc"
  • REMOTE SOURCES:
Actions #10

Updated by rogerdpack (Roger Pack) over 13 years ago

=begin
did you try doing a fresh svn checkout, as well?
-r
=end

Actions #11

Updated by evanphx (Evan Phoenix) over 13 years ago

=begin
There are custom changes to rubygems in trunk that are not yet in rubygems master. You can not use rubygems master or any other version of rubygems with 1.9 trunk other than the version that 1.9 trunk ships with.

  • Evan Phoenix

On Jul 26, 2010, at 8:46 AM, Jon Forums wrote:

Issue #3607 has been updated by Jon Forums.

Out of curiosity I just built 28760 with and without raggi's rubygems perflude branch http://github.com/rubygems/rubygems/compare/master...perflude and got the following failures in both.

Anyone else able to duplicate this on either *nix or Windows?

*** 28760 + RubyGems perflude ERROR ***
C:\Users\Jon\Documents\RubyDev>ruby --version
ruby 1.9.3dev (2010-07-26 trunk 28760) [i386-mingw32]

C:\Users\Jon\Documents\RubyDev>gem list
C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:62:in installed_spec_directories': undefined method path' for Gem:Module (NoMethodError)
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:52:in from_installed_gems' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:868:in source_index'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in init_gemspecs' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in initialize'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:827:in new' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:827:in searcher'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:468:in find_files' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:968:in load_plugins'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/plugins.rb:5:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:in require'
from internal:lib/rubygems/custom_require:29:in require' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:183:in <top (required)>'
from internal:lib/rubygems/custom_require:29:in require' from <internal:lib/rubygems/custom_require>:29:in require'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:7:in <top(required)>' from <internal:lib/rubygems/custom_require>:29:in require'
from internal:lib/rubygems/custom_require:29:in require' from C:/ruby19trunk/bin/gem:9:in '

*** 28760 + RubyGems master ERROR ***
[C:\Users\Jon\Documents\RubyDev]ruby --version
ruby 1.9.3dev (2010-07-26 trunk 28760) [i386-mingw32]

[C:\Users\Jon\Documents\RubyDev]gem list
C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:68:in installed_spec_directories': undefined method path' for Gem:Module (NoMethodError)
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:58:in from_installed_gems' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:883:in source_index'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:81:in init_gemspecs' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems/gem_path_searcher.rb:13:in initialize'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:841:in new' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:841:in block in searcher'
from internal:prelude:10:in synchronize' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:840:in searcher'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:479:in find_files' from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:983:in load_plugins'
from C:/ruby19trunk/lib/ruby/site_ruby/1.9.1/rubygems.rb:1139:in <top (required)>' from <internal:lib/rubygems/custom_require>:29:in require'
from internal:lib/rubygems/custom_require:29:in require' from C:/ruby19trunk/bin/gem:8:in '

http://redmine.ruby-lang.org/issues/show/3607


http://redmine.ruby-lang.org

=end

Actions #12

Updated by jonforums (Jon Forums) over 13 years ago

=begin
all results use:

@Roger: For my builds, I patched up the RubyInstaller recipes to use the newer RubyGems GitHub repo rather than their original svn repo. If you get a chance, would you try to duplicate what I'm seeing using our existing recipes that use the RubyGems svn repo?

Jon
=end

Actions #13

Updated by luislavena (Luis Lavena) over 13 years ago

=begin
On Mon, Jul 26, 2010 at 2:50 PM, Evan Phoenix wrote:

There are custom changes to rubygems in trunk that are not yet in rubygems master. You can not use rubygems master or any other version of rubygems with 1.9 trunk other than the version that 1.9 trunk ships with.

Thank you Evan,

I was hoping those changes be sync'ed back with RubyGems as soon as
possible, seems they didn't made yet. Any particular place we should
look at for it?

Luis Lavena
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

=end

Actions #14

Updated by evanphx (Evan Phoenix) over 13 years ago

=begin

On Jul 26, 2010, at 11:05 AM, Luis Lavena wrote:

On Mon, Jul 26, 2010 at 2:50 PM, Evan Phoenix wrote:

There are custom changes to rubygems in trunk that are not yet in rubygems master. You can not use rubygems master or any other version of rubygems with 1.9 trunk other than the version that 1.9 trunk ships with.

Thank you Evan,

I was hoping those changes be sync'ed back with RubyGems as soon as
possible, seems they didn't made yet. Any particular place we should
look at for it?

When we decide that the changes in 1.9 are the proper ones, then I'll feed them back into rubygems. Is there a reason to do it sooner? Why are people using rubygems master on 1.9 trunk?

  • Evan

--
Luis Lavena
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

=end

Actions #15

Updated by luislavena (Luis Lavena) over 13 years ago

=begin
On Mon, Jul 26, 2010 at 5:47 PM, Evan Phoenix wrote:

When we decide that the changes in 1.9 are the proper ones, then I'll feed them back into rubygems. Is there a reason to do it sooner? Why are people using rubygems master on 1.9 trunk?

RubyInstaller building recipes put RubyGems packages (1.3.7 or
anything) into the Ruby installation because back in 1.9.1, RubyGems
was too old.

This can be disabled if that is the case for 1.9.3/1.9.3 (trunk) if
that is the case.

--
Luis Lavena
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

=end

Actions #16

Updated by evanphx (Evan Phoenix) over 13 years ago

=begin

On Jul 26, 2010, at 2:07 PM, Luis Lavena wrote:

On Mon, Jul 26, 2010 at 5:47 PM, Evan Phoenix wrote:

When we decide that the changes in 1.9 are the proper ones, then I'll feed them back into rubygems. Is there a reason to do it sooner? Why are people using rubygems master on 1.9 trunk?

RubyInstaller building recipes put RubyGems packages (1.3.7 or
anything) into the Ruby installation because back in 1.9.1, RubyGems
was too old.

This can be disabled if that is the case for 1.9.3/1.9.3 (trunk) if
that is the case.

I think it should be disabled, yes.

  • Evan

--
Luis Lavena
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

=end

Actions #17

Updated by sylvain.joyeux (Sylvain Joyeux) over 13 years ago

=begin
Historically, Debian also ships the RubyGems code from rubygems.org in a separate package (and does not ship the code from MRI). Because of that, ruby 1.9 on Debian is currently without any working rubygems.

The underlying questions is the following: what should packagers do ? Should they stop tracking the separate rubygems codebase altogether and only ship the rubygems version shipped with Ruby itself (which also would mean lower update rates ...) ? Should they wait for you to update the separate rubygems ?

Obviously, even though I am not a Debian packager myself, having to track both seems to be unpractical.

The relevant Debian bug report is there:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588125
=end

Actions #18

Updated by bhuga (Ben Lavender) over 13 years ago

=begin
If you're a mere mortal finding this problem from google after updating from 1.9.1 to 1.9.2, the upshot is that you need to delete your old version of Rubygems, which many package managers install in site_ruby. See http://bhuga.net/2010/08/gem-problems-when-upgrading-ruby-192-macports for MacPorts.
=end

Actions #19

Updated by rogerdpack (Roger Pack) over 13 years ago

=begin
I just ran into this, as well [1]. I suppose it's a bug that needs to be fixed within rubygems proper, then?

The following fixed it for me, as a work around.

C:\dev\ruby\downloads\rubygems>set RUBYOPT=

C:\dev\ruby\downloads\rubygems>ruby --disable-gems setup.rb

-r

[1] http://gist.github.com/577354
=end

Actions #20

Updated by rogerdpack (Roger Pack) over 13 years ago

=begin
update: installing rubygems from http://github.com/rubygems/rubygems onto a 1.9.2 distro results in the error above every time you use gems [1].
Thanks!

[1] http://gist.github.com/577369
=end

Actions #21

Updated by luislavena (Luis Lavena) over 13 years ago

=begin
On Mon, Sep 13, 2010 at 11:34 AM, Roger Pack wrote:

Issue #3607 has been updated by Roger Pack.

update: installing rubygems from http://github.com/rubygems/rubygems onto a 1.9.2 distro results in the error above every time you use gems [1].
Thanks!

[1] http://gist.github.com/577369

As commented before by Ruby-Core members, installation of RubyGems on
top of RUby 1.9.2/1.9.3 is not supported.

IMO that should be corrected...

Luis Lavena
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0