Skip to content

Instantly share code, notes, and snippets.

@UnderGrounder96
Last active June 27, 2021 08:36
Show Gist options
  • Save UnderGrounder96/e6ed0520544f0903e54f49c45597129a to your computer and use it in GitHub Desktop.
Save UnderGrounder96/e6ed0520544f0903e54f49c45597129a to your computer and use it in GitHub Desktop.
Install ruby in Centos 8
#!/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