Skip to content

Instantly share code, notes, and snippets.

@fcoury
Created July 30, 2011 05:53
Show Gist options
  • Select an option

  • Save fcoury/1115247 to your computer and use it in GitHub Desktop.

Select an option

Save fcoury/1115247 to your computer and use it in GitHub Desktop.
#!/bin/bash
apt-get update
apt-get install -y build-essential libssl-dev libncurses5-dev libreadline5-dev zlib1g-dev linux-headers-generic libsqlite3-dev
cd /tmp
wget http://repo.webbynode.com/ruby-1.9.2-p290_i386.deb
dpkg -i ruby-1.9.2-p290_i386.deb
rm ruby-1.9.2-p290_i386.deb
test -f /usr/local/bin/ruby && rm /usr/local/bin/ruby
test -f /usr/local/bin/rake && rm /usr/local/bin/rake
test -f /usr/local/bin/gem && rm /usr/local/bin/gem
test -f /usr/local/bin/irb && rm /usr/local/bin/irb
ln -s /usr/bin/ruby /usr/local/bin/ruby
ln -s /usr/bin/rake /usr/local/bin/rake
ln -s /usr/bin/gem /usr/local/bin/gem
ln -s /usr/bin/irb /usr/local/bin/irb
gem update --system
hash -r
new_version=`ruby -v`
echo ""
if (echo $new_version | grep -q "p290"); then
echo Upgrade successful. New ruby version: $new_version
else
echo There was a problem upgrading ruby version to 1.9.2-p290.
fi
@radar

radar commented Sep 23, 2011

Copy link
Copy Markdown

This is new content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment