Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fawce/1727417 to your computer and use it in GitHub Desktop.
Save fawce/1727417 to your computer and use it in GitHub Desktop.
install for ruby-debug in ruby-1.9.3 and ubuntu
#!/bin/bash
##########IMPORTANT###########################################################################
# This script requires rvm: http://beginrescueend.com/
# Before running this script you must install rvm. This script will install ruby 1.9.3-p0 if it
# is not already. Ruby can take 10 minutes to compile.
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
export RVM_SRC=$HOME/.rvm/src/ruby-1.9.3-p0
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
export RVM_SRC=/usr/local/rvm/src/ruby-1.9.3-p0
else
printf "ERROR: An RVM installation was not found.\n"
exit 1
fi
rvm install 1.9.3-p0
rvm use 1.9.3-p0
#To install ruby-debug on Ubuntu ruby-1.9.3 you need to download from http://rubyforge.org/frs/?group_id=8883
mkdir downloaded_gems
cd downloaded_gems
curl -L -O http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -L -O http://rubyforge.org/frs/download.php/74596/ruby_core_source-0.1.5.gem
curl -L -O http://rubyforge.org/frs/download.php/63094/ruby-debug19-0.11.6.gem
curl -L -O http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
gem install archive-tar-minitar
gem install ruby_core_source-0.1.5.gem -- --with-ruby-include=/$RVM_SRC
gem install linecache19-0.5.13.gem -- --with-ruby-include=/$RVM_SRC
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/$RVM_SRC
gem install ruby-debug19-0.11.6.gem -- --with-ruby-include=/$RVM_SRC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment