Last active
July 12, 2021 11:08
-
-
Save defaye/dd36d611329791c00c883337975db319 to your computer and use it in GitHub Desktop.
Install Ruby on Rails with rbenv on Ubuntu 18.04
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
sudo apt update && sudo apt install -y git-all \ | |
autoconf \ | |
bison \ | |
build-essential \ | |
libssl-dev \ | |
libyaml-dev \ | |
libreadline6-dev \ | |
zlib1g-dev \ | |
libncurses5-dev \ | |
libffi-dev \ | |
libgdbm5 \ | |
libgdbm-dev | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.$(echo $SHELL | grep -o '[^/]*$')rc | |
echo 'eval "$(rbenv init -)"' >> ~/.$(echo $SHELL | grep -o '[^/]*$')rc | |
source ~/.$(echo $SHELL | grep -o '[^/]*$')rc | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
rbenv install 2.7 | |
rbenv global 2.7 | |
echo "gem: --no-document" > ~/.gemrc | |
gem install bundler | |
gem install rails | |
rbenv rehash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run this command in one line: