tag:help.rubygems.org,2010-01-19:/discussions/problems/78-no-such-file-to-load-rubygemscommandsmigrateRubyGems.org: Discussion 2012-07-10T03:40:12Ztag:help.rubygems.org,2010-01-19:Comment/11643432010-03-06T15:09:58Z2010-03-06T15:09:58Zno such file to load -- rubygems/commands/migrate <div><p>Hi there, what's your <code>gem env</code> output look like?
This seems to work fine for me with 1.9.1...</p>
<pre>
<code>gem master % gem migrate
This command is deprecated, RubyForge accounts/ownerships have been transferred to Gemcutter.
Please see http://rubygems.org/pages/migrate for more information
gem master % gem -v
1.3.6
gem master % ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin9.8.0]</code>
</pre></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/11643432010-03-06T23:39:16Z2010-03-06T23:39:21Zno such file to load -- rubygems/commands/migrate <div><p>$ gem -v 1.3.6<br>
grigio@grigio-desktop:/usr/bin$ gem help commands<br>
/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)</p>
<pre>
<code>from /usr/local/lib/site_ruby/1.9.1/rubygems/command_manager.rb:169:in `rescue in load_and_instantiate'</code>
</pre>
<p>$ gem env RubyGems Environment:<br>
- 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:</p>
<pre>
<code>- ruby
- x86_64-linux</code>
</pre>
<ul>
<li>GEM PATHS:
<ul>
<li>/usr/lib/ruby1.9/gems/1.9.0</li>
<li>/home/grigio/.gem/ruby/1.9.1</li>
<li>/usr/lib/ruby1.9.1/gems/1.9.1</li>
</ul>
</li>
<li>GEM CONFIGURATION:
<ul>
<li>:update_sources => true</li>
<li>:verbose => true</li>
<li>:benchmark => false</li>
<li>:backtrace => false</li>
<li>:bulk_threshold => 1000</li>
<li>:sources => ["<a href=
"http://gems.rubyforge.org/">http://gems.rubyforge.org/</a>",
"<a href="http://gemcutter.org">http://gemcutter.org</a>",
"<a href="http://gems.github.com">http://gems.github.com</a>"]</li>
</ul>
</li>
<li>REMOTE SOURCES:
<ul>
<li><a href=
"http://gems.rubyforge.org/">http://gems.rubyforge.org/</a></li>
<li><a href="http://gemcutter.org">http://gemcutter.org</a></li>
<li><a href=
"http://gems.github.com">http://gems.github.com</a></li>
</ul>
</li>
</ul></div>grigiotag:help.rubygems.org,2010-01-19:Comment/11643432010-03-09T06:06:04Z2010-03-09T06:06:09Zno such file to load -- rubygems/commands/migrate <div><p>This was affecting me too. I was getting that error when I did
<strong><em>ANYTHING</em></strong> with the gem command, rendering
it completely unusable. I couldn't even gem uninstall gemcutter</p>
<pre>
> 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 `'
</pre>
<p>My workaround:<br></p>
<pre>
sudo mv /usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0 /usr/lib/ruby1.9.1/gems/1.9.1/gems/Xgemcutter-0.5.0
</pre>
<pre>
> 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.org
</pre></div>Tyler Ricktag:help.rubygems.org,2010-01-19:Comment/11643432010-03-09T10:55:53Z2010-03-09T10:55:54Zno such file to load -- rubygems/commands/migrate <div><p>Thanks this worked for me, too. Great.</p></div>Nikotag:help.rubygems.org,2010-01-19:Comment/11643432010-03-09T13:55:27Z2010-03-09T13:55:27Zno such file to load -- rubygems/commands/migrate <div><p>I don't understand how this is possible...</p>
<pre>
<code>/tmp % gem fetch gemcutter
Downloaded gemcutter-0.5.0
/tmp % gem unpack gemcutter-0.5.0.gem
Unpacked gem: '/private/tmp/gemcutter-0.5.0'
/tmp % ls gemcutter-0.5.0/lib/rubygems/commands
migrate.rb tumble.rb webhook.rb yank.rb</code>
</pre>
<p>Can you unpack the gemcutter gem you <code>mv</code>'d and see
if that's the same?</p></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/11643432010-03-09T18:09:13Z2010-03-09T18:09:16Zno such file to load -- rubygems/commands/migrate <div><p>Yes, their contents look identical--</p>
<pre>
> ls /usr/lib/ruby1.9.1/gems/1.9.1/gems/Xgemcutter-0.5.0/lib/rubygems/commands/
migrate.rb tumble.rb webhook.rb yank.rb
> sudo gem unpack gemcutter-0.5.0.gem
Unpacked gem: '/tmp/gemcutter-0.5.0'
> diff -r /tmp/gemcutter-0.5.0 /usr/lib/ruby1.9.1/gems/1.9.1/gems/Xgemcutter-0.5.0
[no differences]
</pre>
<p>Hmm, I might have found something (I'm not sure)...<br>
I added this line to
<code>/usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/gemcutter.rb</code>:<br></p>
<pre>
%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
end
</pre>
<p>And it was giving me this:<br>
<code>["/var/lib/gems/1.9.1/gems/gemcutter-0.2.1/lib"]</code></p>
<p>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 <code>/usr/lib/ruby1.9.1/gems/1.9.1</code> and I
had to reinstall all my gems again. No problem, until I installed
gemcutter.</p>
<p>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:<br></p>
<pre>
sudo mv /var/lib/gems /var/lib/gems_before_upgrade_to_1.3.6
</pre>
<p>And now when I run gem, it doesn't list any gemcutter
paths<br></p>
<pre>
> gem list
[]
/usr/lib/ruby1.9.1/gems/1.9.1/gems/gemcutter-0.5.0/lib/gemcutter.rb:5:in `require': no such file to load -- rubygems/commands/migrate (LoadError)
</pre>
<p>This is the complete value of $LOAD_PATH:<br></p>
<pre>
["/usr/local/lib/site_ruby/1.9.1",
"/usr/local/lib/site_ruby/1.9.1/x86_64-linux",
"/usr/local/lib/site_ruby",
"/usr/lib/ruby/vendor_ruby/1.9.1",
"/usr/lib/ruby/vendor_ruby/1.9.1/x86_64-linux",
"/usr/lib/ruby/vendor_ruby",
"/usr/lib/ruby/1.9.1",
"/usr/lib/ruby/1.9.1/x86_64-linux",
"."]
</pre>
<p>Is something wrong there? Can someone please post what
$LOAD_PATH is for them at this point?</p></div>Tyler Ricktag:help.rubygems.org,2010-01-19:Comment/11643432010-03-10T00:10:54Z2010-03-10T00:10:54Zno such file to load -- rubygems/commands/migrate <div><p>Well, I've given up on 1.3.6 for now. Not only was it having the
problem described here, but it seemed that <em>everywhere</em>
there was a <code>require 'gem_name'</code>, it was failing to find
that gem. I had to add a line above it with <code>gem
'gem_name'</code>. This breaking a lot of things and I couldn't
take it any more, so I reverted everything back to 1.3.5.</p>
<p>I imagine that I could have solved this particular problem for
me by simply doing this:<br></p>
<pre>
%w[migrate tumble webhook yank].each do |command|
gem 'gemcutter'
require "rubygems/commands/#{command}"
Gem::CommandManager.instance.register_command command.to_sym
end
</pre>
<p>but I didn't think to try it before I reverted.</p>
<p>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.</p>
<p>Good luck everyone!</p></div>Tyler Ricktag:help.rubygems.org,2010-01-19:Comment/11643432010-03-10T01:14:30Z2010-03-10T01:14:30Zno such file to load -- rubygems/commands/migrate <div><p>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.</p>
<p>Unfortunately Debian and Ubuntu will neither contribute patches
to RubyGems nor use RubyGems features that will allow this to Just
Work as it should.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/11643432010-03-10T01:49:37Z2010-03-10T01:49:42Zno such file to load -- rubygems/commands/migrate <div><p>You are right, I had Ubuntu RubyGems.</p>
<p>When I tried sudo gem update --system, it told me that wasn't
allowed, so I did this instead:<br></p>
<pre>
sudo gem install rubygems-update-1.3.6.gem
sudo update_rubygems
</pre>
<p>I can see why you say the two versions are not compatible. I
guess I found that out the hard way.</p>
<p>That's unfortunate that Ubuntu/Debian don't play nice. I wish it
were otherwise.</p>
<p>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.</p></div>Tyler Ricktag:help.rubygems.org,2010-01-19:Comment/11643432010-03-28T23:40:31Z2010-03-28T23:40:35Zno such file to load -- rubygems/commands/migrate <div><p>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.</p>
<p>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.</p></div>Dan Croaktag:help.rubygems.org,2010-01-19:Comment/11643432010-04-04T01:09:07Z2010-04-04T01:09:10Zno such file to load -- rubygems/commands/migrate <div><p>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.</p>
<pre>
<code>RubyGems Environment:
- RUBYGEMS VERSION: 1.3.6
- RUBY VERSION: 1.9.1 (2010-01-10 patchlevel 378) [i386-darwin10.2.0]
- INSTALLATION DIRECTORY: /Users/tom/.rvm/gems/ruby-1.9.1-p378
- RUBY EXECUTABLE: /Users/tom/.rvm/rubies/ruby-1.9.1-p378/bin/ruby
- EXECUTABLE DIRECTORY: /Users/tom/.rvm/gems/ruby-1.9.1-p378/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-10
- GEM PATHS:
- /Users/tom/.rvm/gems/ruby-1.9.1-p378
- /Users/tom/.rvm/gems/ruby-1.9.1-p378%global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gemcutter.org", "http://gems.rubyforge.org", "http://gems.github.com/", "http://gems.github.com"]
- "gemcutter_key" => "09a201869ba9a4ce56ad8ef6863e9a5b"
- REMOTE SOURCES:
- http://gemcutter.org
- http://gems.rubyforge.org
- http://gems.github.com/
- http://gems.github.com</code>
</pre></div>Tom Preston-Wernertag:help.rubygems.org,2010-01-19:Comment/11643432010-04-04T01:27:50Z2010-04-04T01:27:50Zno such file to load -- rubygems/commands/migrate <div><p>Tom, are you on OS X too? 10.6?</p></div>John Barnettetag:help.rubygems.org,2010-01-19:Comment/11643432010-04-04T01:53:21Z2010-04-04T01:53:26Zno such file to load -- rubygems/commands/migrate <div><p>Yes, OSX 10.6. rvm 0.1.18.</p></div>Tom Preston-Wernertag:help.rubygems.org,2010-01-19:Comment/11643432010-04-06T16:12:19Z2010-04-06T16:12:23Zno such file to load -- rubygems/commands/migrate <div><p>Was back on 1.9.1 today to check out a bug report, and my
temporary solution to the problem was just:</p>
<p>sudo rm -rf
/Users/lawless/.rvm/gems/ruby-1.9.1-p378/gems/gemcutter-0.5.0</p>
<p>Now I'm able to use the "gem" command again.</p></div>Dan Croaktag:help.rubygems.org,2010-01-19:Comment/11643432010-04-08T08:31:07Z2010-04-08T08:31:11Zno such file to load -- rubygems/commands/migrate <div><p>Also on OS X SL and rvm 0.1.22 here.</p>
<p>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:</p>
<p>$:.unshift File.dirname(<strong>FILE</strong>)</p>
<p>Which fixed it for me ...</p></div>David Leetag:help.rubygems.org,2010-01-19:Comment/11643432010-07-17T20:16:01Z2010-07-17T20:16:01Zno such file to load -- rubygems/commands/migrate <div><p>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!</p></div>Nick Quaranto