nirvdrum / svn2git

Ruby tool for importing existing svn projects into git.
MIT License
2.11k stars 443 forks source link

Could not find 'svn2git' (>= 0) among 58 total gem(s) (Gem::LoadError) #205

Open amedee opened 9 years ago

amedee commented 9 years ago

Running svn2git gives me this error:

/usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'svn2git' (>= 0) among 58 total gem(s) (Gem::LoadError)
    from /usr/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
    from /usr/local/bin/svn2git:22:in `<main>'

It has worked in the past, about 6 months ago, so I have a hunch that it's related to an update of Ruby. I am currently using Ubuntu 15.04, before is was using Ubuntu 14.10. Ruby version: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] I have /home/amedee/.rvm/gems/ruby-2.2.1/bin:/home/amedee/.rvm/gems/ruby-2.2.1@global/bin:/home/amedee/.rvm/rubies/ruby-2.2.1/bin in my $PATH, before /bin

splorp commented 8 years ago

I’m seeing the same error under Mac OS X 10.6.8 Snow Leopard.

Is there a specific location that the svn2git gem should be installed?

nirvdrum commented 8 years ago

If you're using the built-in Ruby on MacOS X, I think you need to install with "sudo gem install svn2git". Did you do that? Or did you just run "gem install svn2git"?

splorp commented 8 years ago

It was the sudo gem install svn2git that caused the issue. The gem was installed, but in the wrong location. When I reinstalled using gem install svn2git, svn2git was installed alongside my other gems and worked perfectly.

nirvdrum commented 8 years ago

Good to know. It's been a while since i've set up with the system Ruby on MacOS X. I couldn't recall which was the correct form to use. Glad to hear it's working for you! I'll look at adding a caveat to the README.

splorp commented 8 years ago

It could have something to do with my particular install of Ruby on Snow Leopard, and not necessarily Mac OS X in general.

For example, sudo gem install svn2git installed the gem into:

~/.rvm/rubies/ruby-1.9.3-p429/bin/svn2git

Whereas gem install svn2git installed the gem into:

~/.rvm/gems/ruby-1.9.3-p429/bin/svn2git

… which is where the other active gems resided.

nirvdrum commented 8 years ago

Ahh, yeah. If you're using RVM you shouldn't ever need to "sudo gem install" anything. Doing so almost always leads to problems like this :-/

splorp commented 8 years ago

The more you know.

(I’m a bit of a Ruby Nuby, as you can tell.)

kinow commented 3 years ago

Installing without sudo (gem install svn2git) worked for me (after uninstallingsudo gem uninstall svn2git`) :+1: