no such file to load -- rubygems/commands/migrate
$ sudo gem 11:25
/usr/lib/ruby1.9/gems/1.9.0/gems/gemcutter-0.5.0/lib/gemcutter.rb:4:in
require': no such file to load -- rubygems/commands/migrate
(LoadError) 11:25 from
/usr/lib/ruby1.9/gems/1.9.0/gems/gemcutter-0.5.0/lib/gemcutter.rb:4:inblock
in '
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Nick Quaranto on 06 Mar, 2010 03:09 PM
Hi there, what's your
gem envoutput look like? This seems to work fine for me with 1.9.1...3 Posted by grigio on 06 Mar, 2010 11:39 PM
$ gem -v 1.3.6
grigio@grigio-desktop:/usr/bin$ gem help commands
/usr/local/lib/site_ruby/1.9.1/rubygems/command_manager.rb:169:in `require': no such file to load -- rubygems/commands/exec_command (LoadError)
$ gem env RubyGems Environment:
- RUBYGEMS VERSION: 1.3.6 - RUBY VERSION: 1.9.1 (2010-01-10 patchlevel 378) [x86_64-linux] - INSTALLATION DIRECTORY: /usr/lib/ruby1.9/gems/1.9.0 - RUBY EXECUTABLE: /usr/bin/ruby1.9.1 - EXECUTABLE DIRECTORY: /usr/lib/ruby1.9/gems/1.9.0/bin - RUBYGEMS PLATFORMS:
4 Posted by Tyler Rick on 09 Mar, 2010 06:06 AM
This was affecting me too. I was getting that error when I did ANYTHING with the gem command, rendering it completely unusable. I couldn't even gem uninstall gemcutter
> sudo gem uninstall gemcutter /usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/gemcutter.rb:4:in `require': no such file to load -- rubygems/commands/migrate (LoadError) from /usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/gemcutter.rb:4:in `block in ' from /usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/gemcutter.rb:3:in `each' from /usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/gemcutter.rb:3:in `' from /usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/rubygems_plugin.rb:1:in `require' from /usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/rubygems_plugin.rb:1:in `' from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1113:in `load' from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1113:in `block in ' from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1105:in `each' from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1105:in `' from /usr/bin/gem:8:in `require' from /usr/bin/gem:8:in `'My workaround:
> gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.6 - RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [x86_64-linux] - INSTALLATION DIRECTORY: /usr/lib/ruby1.9.1/gems/1.9.1 - RUBY EXECUTABLE: /usr/bin/ruby1.9.1 - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-linux - GEM PATHS: - /usr/lib/ruby1.9.1/gems/1.9.1 - /home/tyler/.gem/ruby/1.9.1 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => true - :bulk_threshold => 1000 - :sources => ["http://gems.rubyforge.org/", "http://gemcutter.org"] - "gem" => "--no-rdoc" - REMOTE SOURCES: - http://gems.rubyforge.org/ - http://gemcutter.org5 Posted by Niko on 09 Mar, 2010 10:55 AM
Thanks this worked for me, too. Great.
Support Staff 6 Posted by Nick Quaranto on 09 Mar, 2010 01:55 PM
I don't understand how this is possible...
Can you unpack the gemcutter gem you
mv'd and see if that's the same?7 Posted by Tyler Rick on 09 Mar, 2010 06:09 PM
Yes, their contents look identical--
Hmm, I might have found something (I'm not sure)...
I added this line to
/usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/gemcutter.rb:%w[migrate tumble webhook yank].each do |command| p $LOAD_PATH.grep(/gemcutter/) require "rubygems/commands/#{command}" Gem::CommandManager.instance.register_command command.to_sym endAnd it was giving me this:
["/var/lib/gems/1.9.1/gems/gemcutter-0.2.1/lib"]That is where rubygems was located before I upgraded to Rubygems 1.3.6 yesterday. But I have no idea why it would be in the $LOAD_PATH now. After the upgrade, for some unknown reason the gem path changed to
/usr/lib/ruby1.9.1/gems/1.9.1and I had to reinstall all my gems again. No problem, until I installed gemcutter.So I don't know why or how it was getting that in the $LOAD_PATH. (You saw for yourself it wasn't mentioned in my gem env output.) ... Anyway, I just moved that dir out of the way so it "should" no longer be a variable:
And now when I run gem, it doesn't list any gemcutter paths
This is the complete value of $LOAD_PATH:
Is something wrong there? Can someone please post what $LOAD_PATH is for them at this point?
8 Posted by Tyler Rick on 10 Mar, 2010 12:10 AM
Well, I've given up on 1.3.6 for now. Not only was it having the problem described here, but it seemed that everywhere there was a
require 'gem_name', it was failing to find that gem. I had to add a line above it withgem 'gem_name'. This breaking a lot of things and I couldn't take it any more, so I reverted everything back to 1.3.5.I imagine that I could have solved this particular problem for me by simply doing this:
%w[migrate tumble webhook yank].each do |command| gem 'gemcutter' require "rubygems/commands/#{command}" Gem::CommandManager.instance.register_command command.to_sym endbut I didn't think to try it before I reverted.
I wish I knew why my $LOAD_PATH stopped being auto-populated with all my gems' paths when I upgraded to 1.3.6. But I guess that's another bug for another bug report for another time.
Good luck everyone!
Support Staff 9 Posted by Eric Hodel on 10 Mar, 2010 01:14 AM
Sounds like you originally had Debian or Ubuntu RubyGems installed then upgraded with real RubyGems. The two versions are not compatible and cannot be interchanged.
Unfortunately Debian and Ubuntu will neither contribute patches to RubyGems nor use RubyGems features that will allow this to Just Work as it should.
10 Posted by Tyler Rick on 10 Mar, 2010 01:49 AM
You are right, I had Ubuntu RubyGems.
When I tried sudo gem update --system, it told me that wasn't allowed, so I did this instead:
I can see why you say the two versions are not compatible. I guess I found that out the hard way.
That's unfortunate that Ubuntu/Debian don't play nice. I wish it were otherwise.
And next time I will be sure to remove all traces of Ubuntu's version and then do a completely fresh install from source instead of trying to upgrade.
11 Posted by Dan Croak on 28 Mar, 2010 11:40 PM
I'm seeing the same problem. I'm on OS X Snow Leopard. My output to gem -v and gem migrate looks the same as Nick.
Today, I installed rvm and Ruby 1.9.1 today. I was able to sudo gem install four or five gems but now I see this behavior. It started happening right after I tried to use grb (git_remote_branch), which ran from /usr/bin/grb and then said it couldn't find RubyGem git_remote_branch (>= 0) (Gem::LoadError). Now I am unable to sudo gem install anything.
12 Posted by Tom Preston-Werner on 04 Apr, 2010 01:09 AM
I just saw this same problem after install ruby 1.9.1 via rvm. I was able to install a few gems before gemcutter started failing. Moving gemcutter out of the way allowed me to continue my work.
Support Staff 13 Posted by John Barnette on 04 Apr, 2010 01:27 AM
Tom, are you on OS X too? 10.6?
14 Posted by Tom Preston-Werner on 04 Apr, 2010 01:53 AM
Yes, OSX 10.6. rvm 0.1.18.
15 Posted by Dan Croak on 06 Apr, 2010 04:12 PM
Was back on 1.9.1 today to check out a bug report, and my temporary solution to the problem was just:
sudo rm -rf /Users/lawless/.rvm/gems/ruby-1.9.1-p378/gems/gemcutter-0.5.0
Now I'm able to use the "gem" command again.
16 Posted by David Lee on 08 Apr, 2010 08:31 AM
Also on OS X SL and rvm 0.1.22 here.
I edited ~/.rvm/gems/ruby-1.9.1-p378/gems/gemcutter-0.5.0/lib/gemcutter.rb and added this line before the .each { ... require } block:
$:.unshift File.dirname(FILE)
Which fixed it for me ...
Support Staff 17 Posted by Nick Quaranto on 17 Jul, 2010 08:16 PM
I'm not seeing this with 1.9.2 and gemcutter 0.6.0. If anyone else can provide a reproducible test case with it still happening let me know!
Nick Quaranto closed this discussion on 17 Jul, 2010 08:16 PM.