Skip to content

Instantly share code, notes, and snippets.

@parasquid
Forked from sfate/README.md
Last active December 17, 2015 14:29
Show Gist options
  • Save parasquid/5624732 to your computer and use it in GitHub Desktop.
Save parasquid/5624732 to your computer and use it in GitHub Desktop.
Install ruby-2.0.0-p195 on a Ubuntu 12.04 production server using checkinstall

Installs ruby-2.0.0-p247 on ubuntu via checkinstall so it's in your package manager and you can remove it.

Quick install:

curl -Lo- https://gist.github.com/parasquid/5624732/raw/install-ruby-2-ubuntu.sh | bash
#!/usr/bin/env bash
set -e
RUBY_V='ruby-2.0.0-p247'
sudo apt-get install checkinstall -y
sudo apt-get build-dep ruby1.9.1 -y
wget -c http://ftp.ruby-lang.org/pub/ruby/2.0/$RUBY_V.tar.gz
tar xzf $RUBY_V.tar.gz
cd $RUBY_V
./configure --enable-load-relative
make
sudo checkinstall -y -D \
--pkgversion 2.0.0-p247 \
--provides "ruby-interpreter"
# install ruby gems
sudo apt-get install libyaml-ruby libzlib-ruby -y
wget -c http://production.cf.rubygems.org/rubygems/rubygems-2.1.7.tgz
tar -xzf rubygems-2.1.7.tgz
cd rubygems-2.1.7
sudo ruby setup.rb
@StephanX
Copy link

Worked like a boss, thanks!

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