Skip to content

Instantly share code, notes, and snippets.

@mark-moseley
Forked from djanowski/gist:159524
Created August 3, 2009 17:38
Show Gist options
  • Save mark-moseley/160706 to your computer and use it in GitHub Desktop.
Save mark-moseley/160706 to your computer and use it in GitHub Desktop.
# 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, ruby-debug, ruby-debug-ide, and ruby_core_source
for name in columnize linecache linecache19 ruby-debug-base ruby-debug-base19 ruby-debug ruby-debug19 ruby-debug-ide ruby_core_source
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
# Install the ruby-debug port.
sudo gem1.9 install ruby-debug19 --no-rdoc --no-ri
# 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