Last active
April 17, 2020 16:33
-
-
Save seccomiro/1f6089a3dff09503cad3d6e8774d4b00 to your computer and use it in GitHub Desktop.
Install rbenv, ruby-build, rbenv-vars and Ruby 2.7.1 on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Just run: | |
# sh -c "$(wget -O- https://gist.githubusercontent.com/seccomiro/1f6089a3dff09503cad3d6e8774d4b00/raw/fc8965c22237d527b29f95d05cabcf673ab2851d/ruby-2.7.1.sh)" | |
{ # this ensures the entire script is downloaded # | |
sudo apt install git build-essential libssl-dev zlib1g-dev | |
cd ~/.rbenv && src/configure && make -C src | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
cd ~/.rbenv && src/configure && make -C src | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
~/.rbenv/bin/rbenv init | |
mkdir -p "$(rbenv root)"/plugins | |
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build | |
git clone https://github.com/rbenv/rbenv-vars.git $(rbenv root)/plugins/rbenv-vars | |
rbenv install 2.7.1 | |
rbenv global 2.7.1 | |
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash | |
} # this ensures the entire script is downloaded # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment