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

Failure to install ruby 1.8.7 #921

Closed
miketheman opened this Issue Apr 22, 2012 · 4 comments

Comments

Projects
None yet
3 participants

Cleaned up rvm install, using latest XCode 4.3.2/command line tools on OSX 10.7.3.

Output:

$ rvm install 1.8.7
Installing Ruby from source to: /Users/michael/.rvm/rubies/ruby-1.8.7-p358, this may take a while depending on your cpu(s)...

ruby-1.8.7-p358 - #fetching 
ruby-1.8.7-p358 - #downloading ruby-1.8.7-p358, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4111k  100 4111k    0     0    99k      0  0:00:41  0:00:41 --:--:-- 95297
ruby-1.8.7-p358 - #extracting ruby-1.8.7-p358 to /Users/michael/.rvm/src/ruby-1.8.7-p358
ruby-1.8.7-p358 - #extracted to /Users/michael/.rvm/src/ruby-1.8.7-p358
Applying patch 'stdout-rouge-fix' (located at /Users/michael/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
Applying patch 'no_sslv2' (located at /Users/michael/.rvm/patches/ruby/1.8.7/no_sslv2.diff)
ruby-1.8.7-p358 - #configuring 
ruby-1.8.7-p358 - #compiling 
ruby-1.8.7-p358 - #installing 
Retrieving rubygems-1.8.23
awk: nonterminated character class ^rubygems-1.
 source line number 1
 context is
     >>> /^rubygems-1.8.23.tgz=/ <<< 
sed: 1: "s#^rubygems-\033[01;31m1.8 ...": unbalanced brackets ([])
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
/Users/michael/.rvm/scripts/fetch: line 130: 31m1.8.23.tgz: command not found
/Users/michael/.rvm/scripts/fetch: line 130: 31m1.8.23.tgz: command not found
There was an error, please check /Users/michael/.rvm/log/ruby-1.8.7-p358/*.log. Next we'll try to fetch via http.
Trying ftp:// URL instead.
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
/Users/michael/.rvm/scripts/fetch: line 194: 31m1.8.23.tgz: command not found
/Users/michael/.rvm/scripts/fetch: line 194: 31m1.8.23.tgz: command not found
There was an error, please check /Users/michael/.rvm/log/ruby-1.8.7-p358/*.log
There has been an error while trying to fetch the source. 
Halting the installation.
ruby-1.8.7-p358 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.8.7-p358 - #importing default gemsets (/Users/michael/.rvm/gemsets/)
Install of ruby-1.8.7-p358 - #complete 
Please be aware that you just installed a ruby that requires        2 patches just to be compiled on up to date linux system.
This may have known and unaccounted for security vulnerabilities.
Please consider upgrading to Ruby 1.9.3-194 which will have all of the latest security patches.


$ rvm version

rvm 1.12.5 () by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

Not sure where the URL is meant to be generates, but I'm guessing it's somewhere in https://github.com/wayneeseguin/rvm/blob/master/scripts/rubygems

Any logs desired? I can provide anything.

Confirmed that this affects all versions. It may have something to do with colorized output.

$ rvm rubygems latest
Retrieving rubygems-1.8.23
sed: 1: "s#^rubygems-\033[01;31m1.8 ...": unbalanced brackets ([])
awk: nonterminated character class ^rubygems-1.
 source line number 1
 context is
     >>> /^rubygems-1.8.23.tgz=/ <<< 
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
/Users/michael/.rvm/scripts/fetch: line 130: 31m1.8.23.tgz: command not found
/Users/michael/.rvm/scripts/fetch: line 130: 31m1.8.23.tgz: command not found
There was an error, please check /Users/michael/.rvm/log/system/*.log. Next we'll try to fetch via http.
Trying ftp:// URL instead.
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
/Users/michael/.rvm/scripts/fetch: line 194: 31m1.8.23.tgz: command not found
/Users/michael/.rvm/scripts/fetch: line 194: 31m1.8.23.tgz: command not found
There was an error, please check /Users/michael/.rvm/log/system/*.log
There has been an error while trying to fetch the source. 
Halting the installation.

The first line in the output follows this colorized scheme:

(green)Retrieving rubygems-(red)1.8.(white)23

Trying rvm --color=no rubygems latest dumps same error, and still colorized output.

Contributor

ddd commented Apr 22, 2012

@miketheman Please provide

bash --version

and ensure that you are using at least 3.2.x

If using ZSH, please ensure you are using 4.3.12 but NOT 4.3.15 (See rvm notes )

Also, since you are using OS X, please read https://rvm.io/os/osx for important information regarding Xcode.

Please provide traces of all commands (remove your current 1.8.7 and reinstall using --trace) via https://gist.github.com so we can track this, ONCE you have ensured you meet the prerequisites on https://rvm.io/rvm/prerequisites and have read both:

rvm requirements

and the https://rvm.io/os/osx/ page.

Thank you.

@deryldoucette I think I may have a lead on this.

$ bash --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)
Copyright (C) 2007 Free Software Foundation, Inc.

XCode is all in order as per requirements and notes.

My ENV has GREP_OPTIONS set to '--color=always'. Disabling this moved forward.
The line in question for rubygems is here: https://github.com/wayneeseguin/rvm/blob/master/scripts/rubygems#L94

Since there's 108 occurences of grep in rvm, it might be prevalent to export the GREP_OPTIONS setting for the context of the RVM execution, or set it to --color=never for each instance to prevent colorized output from interfering.

I've run the procedure twice - one with colorized output, one without, and provided the gist output here: https://gist.github.com/191069094a8200684595

@mpapis mpapis added a commit that referenced this issue Apr 23, 2012

@mpapis mpapis escape grep, update #921 19ef218

@mpapis mpapis closed this in 93f6053 Apr 23, 2012

@ghost ghost assigned mpapis Apr 23, 2012

@mpapis mpapis added a commit that referenced this issue Apr 24, 2012

@mpapis mpapis fix command grep, update #921 0c63bd0

Great, thanks! I'll have to test this on a "clean" system, but it looks like it should work.

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