Created
August 1, 2009 00:38
-
-
Save djanowski/159524 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This assumes you have the latest Ruby 1.9 installed via MacPorts: | |
# | |
# $ sudo port sync | |
# $ sudo port install ruby19 | |
# | |
# Make sure there are no trails of columnize, linecache, ruby-debug-base and ruby-debug. | |
for name in columnize linecache ruby-debug-base ruby-debug | |
do | |
(gem1.9 list | grep ^$name >/dev/null) && sudo gem1.9 uninstall -a -x -I $name | |
find /opt/local/lib/ruby1.9/gems/1.9.1/gems -name "$name*" -type d -maxdepth 1 -print0 | sudo xargs -0 rm -rf | |
done | |
# Get Ruby 1.9.1-p129 source. | |
if [ ! -d /tmp/ruby-1.9.1-p129 ]; then | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p129.tar.gz | |
tar xzf ruby-1.9.1-p129.tar.gz | |
fi | |
# Install the ruby-debug port. | |
sudo gem1.9 install mark-moseley-ruby-debug-base --no-rdoc --no-ri -- --with-ruby-include=/tmp/ruby-1.9.1-p129 | |
sudo gem1.9 install ruby-debug --no-rdoc --no-ri --ignore-dependencies | |
# Simple test. | |
cat > ruby-debug-test.rb <<TEST | |
require "ruby-debug" | |
debugger | |
puts "w00t! you can debug in 1.9!" | |
TEST | |
# Run the test. | |
ruby1.9 ruby-debug-test.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment