Skip to content

Instantly share code, notes, and snippets.

@gengshuo
Last active July 19, 2018 07:53
Show Gist options
  • Save gengshuo/88428da8826eb0f978132aefc656b9f0 to your computer and use it in GitHub Desktop.
Save gengshuo/88428da8826eb0f978132aefc656b9f0 to your computer and use it in GitHub Desktop.
Ubuntu 16.04 / rbenv / Ruby 2.5.1
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y build-essential git-core bison openssl libreadline6-dev curl zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 autoconf libc6-dev libpcre3-dev curl libcurl4-nss-dev libxml2-dev libxslt-dev imagemagick nodejs libffi-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
touch ~/.bashrc
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install -l
rbenv install 2.5.1
rbenv global 2.5.1
echo "gem: --no-document" > ~/.gemrc
gem install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment