Skip to content

Instantly share code, notes, and snippets.

@sohooo
Created October 7, 2020 13:16
Show Gist options
  • Save sohooo/162b4e4ba92b19d33c05d0c6f1325049 to your computer and use it in GitHub Desktop.
Save sohooo/162b4e4ba92b19d33c05d0c6f1325049 to your computer and use it in GitHub Desktop.
Build Rubies
# building Ruby versions on Vagrant box
#
# https://github.com/rbenv/ruby-build
#
# booting vagrant box
cd ~/Code/boxes/centos7
vagrant up
vagrant ssh
# install ruby-build
git clone https://github.com/rbenv/ruby-build.git
sudo PREFIX=/usr/local ./ruby-build/install.sh
which ruby-build
/usr/local/bin/ruby-build
# dependencies
sudo yum install -y gcc bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
# build rubies
# list rubies
ruby-build --definitions
# build $RUBY_VERSIONS
export RUBY_PREFIX=/opt/rubies
export RUBY_VERSIONS=2.6.3
sudo mkdir -p $RUBY_PREFIX
for version in $RUBY_VERSIONS ; do
echo "==> $version"
sudo time /usr/local/bin/ruby-build $version ${RUBY_PREFIX}/ruby-${version} | tee ruby-${version}.log
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment