Ruby 1.9 with RVM

by adityasanghi
3 deployments · 0 still active · last rev. 6 years ago

RVM 1.9

Compatible with: No distros currently supported

function set_production_gemrc {
  cat > ~/.gemrc << EOF
verbose: true
bulk_treshold: 1000
install: --no-ri --no-rdoc --env-shebang
benchmark: false
backtrace: false
update: --no-ri --no-rdoc --env-shebang
update_sources: true


function install_rvm() {
  apt-get -y install build-essential libmysqlclient-dev bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake

  sudo bash < <(curl -s -k
  cat >> /etc/profile <<'EOF'
# Load RVM if it is installed,
#  first try to load  user install
#  then try to load root install, if user install is not there.
if [ -s "$HOME/.rvm/scripts/rvm" ] ; then
  . "$HOME/.rvm/scripts/rvm"
elif [ -s "/usr/local/rvm/scripts/rvm" ] ; then
  . "/usr/local/rvm/scripts/rvm"

  source /etc/profile

function install_ruby_19 {
  rvm install 1.9.2
  rvm use 1.9.2 --default
  gem update --system
  gem install bundler --no-ri --no-rdoc