Skip to content

Instantly share code, notes, and snippets.

@ealden
Created June 11, 2019 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ealden/bf33672f4cb221b9028ed0c4e804e148 to your computer and use it in GitHub Desktop.
Save ealden/bf33672f4cb221b9028ed0c4e804e148 to your computer and use it in GitHub Desktop.
Ruby install in Ubuntu 18.04 LTS
# Install dependencies as root
apt install -y build-essential libssl-dev libreadline-dev zlib1g-dev
# Install rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
# Install ruby-build
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
# Install latest Ruby and set it as global
rbenv install 2.6.3
rbenv global 2.6.3
# Install bundler as we always need it
gem install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment