how to install downloaded ruby tarball by ruby-install
if you got brew, brew install ruby-install
or install ruby-install
from here: https://github.com/postmodern/ruby-install
at first, run ruby-install --no-install-deps --no-download ruby 2.3.0
, you will see filename, then you can download the ruby tarball from
http://cache.ruby-lang.org/pub/ruby/
or `https://mirrors.huaweicloud.com/ruby/ruby/
mv it to ~/src, then re-run the above ruby-install command
export PATH=$(brew --prefix curl)/bin:$PATH
export PATH=$(brew --prefix openssl)/bin:$PATH
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)"
# For compilers to find openssl and readline (brew info openssl)
export LDFLAGS="-L $(brew --prefix openssl)/lib -L $(brew --prefix readline)/lib"
export CPPFLAGS="-I $(brew --prefix openssl)/include -I $(brew --prefix readline)/include"
add these to your bash_profile, install ruby with openssl
Written by fang
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby-install
Authors
dfang
12.24K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#