Skip to content

Instantly share code, notes, and snippets.

@aleksseven
Last active November 23, 2020 02:48
Show Gist options
  • Save aleksseven/35b4e40f6a4d71a1ec29886b25dc4e35 to your computer and use it in GitHub Desktop.
Save aleksseven/35b4e40f6a4d71a1ec29886b25dc4e35 to your computer and use it in GitHub Desktop.

1. Install with APT.

sudo apt update sudo apt install ruby-full

2. Install using rbenv.

sudo apt install git curl autoconf bison build-essential
libssl-dev libyaml-dev libreadline6-dev zlib1g-dev
libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

with curl

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash

with wget

wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer -O- | bash

3. Configure your PATH.

If you are using Bash:

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

echo 'eval "$(rbenv init -)"' >> ~/.bashrc

source ~/.bashrc

If you are using Zsh:

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc

echo 'eval "$(rbenv init -)"' >> ~/.zshrc

source ~/.zshrc

4. Install ruby.

rbenv install 2.7.2

rbenv global 2.7.1

ruby -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment