Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: unable to clone --- remove usr/local/bin/rvm* if possible #810

Closed
docwhat opened this issue Mar 8, 2012 · 14 comments
Closed

ERROR: unable to clone --- remove usr/local/bin/rvm* if possible #810

docwhat opened this issue Mar 8, 2012 · 14 comments
Assignees
Milestone

Comments

@docwhat
Copy link
Contributor

docwhat commented Mar 8, 2012

$ lsb_release -a                                                                                     
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.04
Release:        11.04
Codename:       natty
$ git --version
git version 1.7.4.1
$ rm -rf ~/.rvm
$ exit # then I restart the shell
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
$ exit # then I restart the shell
$ rvm get stable
fatal: destination path 'rvm' already exists and is not an empty directory.
fatal: destination path 'rvm' already exists and is not an empty directory.

ERROR: Unable to clone the RVM repository, attempted both git:// and https://

RVM reloaded!
@mpapis mpapis closed this as completed Mar 8, 2012
@ghost ghost assigned mpapis Mar 8, 2012
@docwhat
Copy link
Contributor Author

docwhat commented Mar 8, 2012

That did not fix the problem. I don't have ruby-rvm installed nor did I have any of those files.

env | grep rvm showed nothing after removing ~/.rvm and restarting my shell.

@mpapis
Copy link
Member

mpapis commented Mar 8, 2012

@docwhat have you ever used sudo / rvmsudo with rvm ? check find $rvm_path/ -not -user "$USER"

@docwhat
Copy link
Contributor Author

docwhat commented Mar 9, 2012

Not that I know of. As I showed in my original post, I rm -rfed my ~/.rvm directory...I can run those steps and recreate the problem at-will.

@mpapis mpapis reopened this Mar 9, 2012
@mpapis
Copy link
Member

mpapis commented Mar 9, 2012

@docwhat what about your /etc/rvmrc and ~/.rvmrc files could you gist them ?

@docwhat
Copy link
Contributor Author

docwhat commented Mar 9, 2012

My ~/.rvmrc is at https://gist.github.com/2007291

I don't have an /etc/rvmrc

@mpapis
Copy link
Member

mpapis commented Mar 9, 2012

ok so please gist output of:

bash -s -- stable --trace < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

it should provide insight why and how it fails on this paths

@docwhat
Copy link
Contributor Author

docwhat commented Mar 9, 2012

This is from my current environment. If you want me to follow my steps above, I can do it there, too.

https://gist.github.com/2007291#file_trace.txt

@mpapis
Copy link
Member

mpapis commented Mar 9, 2012

ok that looks fine which eliminates installer itself, now test/gist:

rvm --trace get stable
rvm get stable

use both comman the second one call is to easier spot the breaking point

@docwhat
Copy link
Contributor Author

docwhat commented Mar 9, 2012

Okay, got the output for you:

https://gist.github.com/2007291#file_rvm_get_stable.txt

( rvm --trace get stable ; rvm get stable ) |& tee rvm-get-stable.txt

https://gist.github.com/2007291#file_rvm_get_stable.env.txt

env | grep rvm > rvm-get-stable.env.txt

@mpapis
Copy link
Member

mpapis commented Mar 9, 2012

@docwhat does rvm-restart help ? ... it looks like mixed old and new versions loaded at once

@docwhat
Copy link
Contributor Author

docwhat commented Mar 10, 2012

@mpapis Nope.

However, since I had some time now. I tried running:

rvm-installer --branch stable

... and that does work.

Now, I've been using rvm forever on the machine above (my workstation) and on my laptop and I've occasionally seen a problem where it looses track of some of the variables. I hadn't paid attention, but I think it may have been related:

  1. rvm get latest # this was an older version
  2. cd /path/to/my/project # this directory has a .rvmrc file
  3. I get the 'do you want to allow this' message and I say y
  4. ...and it says something about not being able to write to /something or the directory doesn't exist.
  5. It doesn't remember that I said y to the confirmation message (i.e. cd .. ; cd - asks the confirmation again).

@docwhat
Copy link
Contributor Author

docwhat commented Mar 10, 2012

okay.

So @mpapis and I sat down and figured out what happened...

  1. At some point in the past, a version of RVM accidentally installed the contents of ~/.rvm/bin/ into ~/bin/.
  2. At some point after that, I figured out rvm was incorrect and deleted ~/bin/rvm but did not delete the other files in ~/bin/ that belonged to RVM.
  3. When I reinstalled stable rvm (via bash -s stable < (....)) it worked fine because it used the rvm-installer from the URL.
  4. ...but when I ran rvm get stable it used the ancient rvm-installer in ~/bin/ which has a git clone step which generated the fatal: ... messages.

It might be worth adding a check in rvm-installer that there isn't a copy of the bin files in ~/bin/ for old-timey users of RVM don't have to go through this song and dance again.

@mpapis
Copy link
Member

mpapis commented Mar 10, 2012

ok, scheduled for next version -> 1.11.0

@mpapis mpapis closed this as completed in affcd68 Apr 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants