hchoroomi (owner)

Fork Of

Revisions

gist: 160399 Download_button fork
public
Description:
ruby-debug -- Ruby 1.9
Public Clone URL: git://gist.github.com/160399.git
Embed All Files: show embed
Bash #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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