Ruby Install Error running ‘requirements_osx_brew_update_system ruby-2.3.1

Operating system: macOS 10.12.1

Install Ruby 2.3.1 error

The specific error message is as follows.

chaorenbuhuifeideMacBook-Air:~ chaorenbuhuifei$ rvm install 2.3.1

Searching for binary rubies, this might take some time.

Found remote file https://rubies.travis-ci.org/osx/10.12/x86_64/ruby-2.3.1.tar.bz2

Checking requirements for osx.

Installing requirements for osx.

Updating system…….

Error running ‘requirements_osx_brew_update_system ruby-2.3.1′,

showing last 15 lines of /Users/chaorenbuhuifei/.rvm/log/1481424365_ruby-2.3.1/update_system.log

https://github.com/Homebrew/homebrew/wiki/Common-Issues

and make sure `brew update` works before continuing.’

++ rvm_pretty_print stderr

++ case “${rvm_pretty_print_flag:=auto}” in

++ case “${TERM:-dumb}” in

++ case “$1” in

++ [[ -t 2 ]]

++ return 1

++ printf %b ‘Failed to update Homebrew, follow instructions here:

https://github.com/Homebrew/homebrew/wiki/Common-Issues

and make sure `brew update` works before continuing.\n’

Failed to update Homebrew, follow instructions here:

https://github.com/Homebrew/homebrew/wiki/Common-Issues

and make sure `brew update` works before continuing.

++ return 1

Requirements installation failed with status: 1.

Error running ‘requirements_osx_brew_update_system ruby-2.3.1’

 

How to Solve:

Step 1:

$ brew install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl sqlite

This method will report error

Error: No available formula with the name “apple-gcc42”

==> Searching for similarly named formulae…

Error: No similarly named formulae found.

==> Searching taps…

This formula was found in a tap:

homebrew/dupes/apple-gcc42

To install it, run:

brew install homebrew/dupes/apple-gcc42

 

Step 2:

$brew install homebrew/dupes/apple-gcc42

 

then re-install

$rvm install 2.3.1

 

 

Read More: