Skip to content

Instantly share code, notes, and snippets.

@luisbebop
Created November 26, 2017 16:32
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save luisbebop/71744181980fdd9372c0e85ab8c7299d to your computer and use it in GitHub Desktop.
Save luisbebop/71744181980fdd9372c0e85ab8c7299d to your computer and use it in GitHub Desktop.
Install rbenv on Amazon Linux AMI
sudo yum install -y git gcc make readline-devel openssl-devel
git clone git://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install ruby-build system-widely
git clone git://github.com/rbenv/ruby-build.git /tmp/ruby-build
cd /tmp/ruby-build
sudo ./install.sh
rbenv install 2.4.1 && rbenv global 2.4.1
@Startouf
Copy link

If you need to install the ruby version from a gemfile in ./repository/Gemfile

rbenv install $(grep -oP "ruby '\K(.*)[^']" repository/Gemfile)

@ryush00
Copy link

ryush00 commented Jul 13, 2022

It should be updated with https:// not git:// (deprecated 😢)

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