Skip to content

Instantly share code, notes, and snippets.

@butschi
butschi / install-ruby-on-rails.sh
Last active December 1, 2020 19:52 — forked from soardex/gist:e95cdc230d1ac5b824b3
Install rbenv in EC2
# install build dependencies
sudo yum install -y git git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel jd postgresql postgresql-devel postgresql-contrib postgresql-libs
# clone and install rbenv environment
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile