Last active
June 27, 2021 08:36
-
-
Save UnderGrounder96/e6ed0520544f0903e54f49c45597129a to your computer and use it in GitHub Desktop.
Install ruby in Centos 8
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
#!/usr/bin/env bash | |
# Install ruby in Centos 8 | |
sudo dnf install -y epel-release | |
sudo dnf install -y @development python3 | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
cd ~/.rbenv && src/configure && make -C src | |
export PATH="$HOME/.rbenv/bin/rbenv:usr/bin/python3:$PATH" | |
echo 'export PATH="$HOME/.rbenv/bin:/usr/bin/python3:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
~/.rbenv/bin/rbenv init | |
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build | |
rbenv install 2.5.8 # rbenv install -l; to list stable releases | |
echo '$(rbenv local 2.5.8)' >> ~/.bash_profile | |
rbenv local 2.5.8 | |
gem install bundler -v 2.2.9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment