Skip to content

Instantly share code, notes, and snippets.

@taiansu
Last active December 18, 2015 15:59
Show Gist options
  • Save taiansu/5808048 to your computer and use it in GitHub Desktop.
Save taiansu/5808048 to your computer and use it in GitHub Desktop.
install ruby 2.1 in ubuntu
#!/usr/bin/env bash
sudo apt-get -y update
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison pkg-config libffi-dev vim
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
cd
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc && exec $SHELL -l
rbenv install 2.1.2
rbenv global 2.1.2
gem install chef --no-ri --no-rdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment