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

Already on GitHub? Sign in to your account

Can't reinstall RVM after move/delete of $HOME/.rvm #1188

Closed
brauliobo opened this Issue Oct 4, 2012 · 19 comments

Comments

Projects
None yet
3 participants

➜ ~ mv .rvm blah
➜ ~ curl -L https://get.rvm.io | bash -s stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10009 100 10009 0 0 4266 0 0:00:02 0:00:02 --:--:-- 9774k
BASH 3.2.25 required (you have 4.1.5(1)-release)
➜ ~

Owner

mpapis commented Oct 4, 2012

this is of course a bug - but it shows another problem - you have bash 4.1 which is not supported, only bash 3.2.17+, 4.2+ and zsh 4.3.11+ is supported.

hum, bash 4.1 the version present at debian 6, which is an important distribution...
but note that in this case i'm using zsh, even so bash is required...

gucki commented Oct 6, 2012

This bug prevents me to install rvm on a new debian squeeze system... :(

gucki commented Oct 6, 2012

To install rvm anway (works fine so far), just do:

curl -L https://get.rvm.io > a
# remove the lines inside the file a for the bash version check manually
cat a | bash -s stable --ruby
Owner

mpapis commented Oct 6, 2012

@gucki could you run the tests on your system to confirm it works as expected? You can find instructions for testing here: https://github.com/wayneeseguin/rvm/blob/master/HACKING.md

gucki commented Oct 7, 2012

I just followed the instructions and the tests are currently running. So far without error, as far as I can tell.

But there seems to be a bug? in the test suite.Even I did tf --text fast/* for which the README.md says it's not going to install any rubies (well, in fact the info for long/* says it's going to install rubies so I'd assuem fast/* does not) it's installing several rubies (1.9.2, 1.8.7, ...).

gucki commented Oct 7, 2012

BTW, here's my bash version (the standart one from latest debian squeeze):

bash --version
GNU bash, Version 4.1.5(1)-release (x86_64-pc-linux-gnu)

gucki commented Oct 7, 2012

And here's the error message when trying to install rvm:

root@vs16332:/# curl -L https://get.rvm.io | bash -s stable --ruby
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10009  100 10009    0     0   6832      0  0:00:01  0:00:01 --:--:-- 25717
BASH 3.2.25 required (you have 4.1.5(1)-release)

gucki commented Oct 7, 2012

Tests just finished:

tf --text fast/*
##### starting test alias.
....
##### Processed commands 455 of 455, success tests 359 of 359.

Is there any need to run the long/* tests too?

Owner

mpapis commented Oct 7, 2012

Then 4.1.5 is officially supported now! There were some errors with it, but I guess they got fixed by improving code quality and ZSH support.

The version comparison will be fixed with 1.16.x

Owner

mpapis commented Oct 7, 2012

can someone test this one in bash 4.1:

[[ "$( printf "4.1.5(1)-release\n3.2.25\n" | sort -n -t"." | head -n 1 )" == "3.2.25" ]] && echo "ok" || echo "fail"

gucki commented Oct 7, 2012

Is this locale dependent?!

root@de:~# bash --version
GNU bash, Version 4.1.5(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
Lizenz GPLv3+: GNU GPL Version 3 oder jünger <http://gnu.org/licenses/gpl.html>

Dies ist freie Software.  Sie darf verändert und verteilt werden.
Für dieses Programm besteht keinerlei Garantie.
root@de:~# [[ "$( printf "4.1.5(1)-release\n3.2.25\n" | sort -n -t"." | head -n 1 )" == "3.2.25" ]] && echo "ok" || echo "fail"
fail


root@en:~# bash --version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@en:~# [[ "$( printf "4.1.5(1)-release\n3.2.25\n" | sort -n -t"." | head -n 1 )" == "3.2.25" ]] && echo "ok" || echo "fail"
ok

gucki commented Oct 7, 2012

Some more information, just for completeness:

root@de:~# echo "$BASH_VERSION"
4.1.5(1)-release

root@en:~# echo "$BASH_VERSION"
4.1.5(1)-release

gucki commented Oct 7, 2012

Strange, isn't it?

root@de:~# printf "4.1.5(1)-release\n3.2.25\n" | sort -n -t"."
4.1.5(1)-release
3.2.25

root@en:~# printf "4.1.5(1)-release\n3.2.25\n" | sort -n -t"."
3.2.25
4.1.5(1)-release
Owner

mpapis commented Oct 7, 2012

try with:

 printf "4.1.5(1)-release\n3.2.25\n" | LC_LANG=C sort -n -t"."

gucki commented Oct 7, 2012

When using LANG instead of LC_LANG it works, otherwise not.

root@de:~# printf "4.1.5(1)-release\n3.2.25\n" | LC_LANG=C sort -n -t"."
4.1.5(1)-release
3.2.25

root@de:~# printf "4.1.5(1)-release\n3.2.25\n" | LANG=C sort -n -t"."
3.2.25
4.1.5(1)-release
Owner

mpapis commented Oct 7, 2012

ok, last test:

printf "4.1.5(1)-release\n3.2.25\n" | LC_ALL=C sort -n -t"."

gucki commented Oct 7, 2012

Works fine :)

@mpapis mpapis closed this in 564f8b7 Oct 7, 2012

Owner

mpapis commented Oct 7, 2012

opened to track merge status for 1.16.9

@mpapis mpapis reopened this Oct 7, 2012

@mpapis mpapis closed this in 6d38534 Oct 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment