Create RVM environment (Ubuntu)
sudo apt-get install zlib1g-dev libssl-dev libsqlite3-dev libmysqlclient-dev imagemagick librmagick-ruby libxml2-dev libxslt1-dev build-essential openssl libreadline6 libreadline6-dev zlib1g libyaml-dev libsqlite3-0 sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison libpq-dev libpq5 libmysql-ruby libmysqlclient-dev
# Install RVM with ruby: https://rvm.io//rvm/install/
curl -L get.rvm.io | bash -s stable --ruby
# Install packages: https://rvm.io/packages
rvm pkg install autoconf
rvm pkg install zlib
# See this post for solving problems with readline: https://rvm.io/packages/readline/
# and use this command: rvm --skip-autoreconf pkg install readline
rvm pkg install readline
rvm pkg install openssl
rvm pkg install iconv
# Install any version of ruby with necessary dependencies
rvm install 1.9.3 --with-readline-dir=$rvm_usr_path --with-iconv-dir=$rvm_usr_path --with-zlib-dir=$rvm_usr_path --with-openssl-dir=$rvm_usr_path
rvm use 1.9.3 --default