Skip to content

How to install rb trepanning

R. Bernstein edited this page Jan 3, 2016 · 20 revisions

How to install rb-trepanning

Check out the Patches to Ruby 2.x and 1.9 to support beautiful debugging project to see if there is already a package made for your OS.

Install from RVM

Many people use rvm to allow multiple versions of Ruby and gems to coexist.

If you have rvm installed, download ruby-2.1.5-combined-rvm.patch from https://sourceforge.net/projects/ruby-debugger-runtime and then run:

 $ rvm install 2.1.5 -n 2.1.5-trepan --patch ./ruby-2.1.5-combined-rvm.patch

To match up the exact patchlevel with one of the combined patches you can specify the patch number in the rvm install. For example:

 $ rvm install 1.9.3-p392 -n 1.9.3-p392-trepan --patch ./patches/ruby-1.9.3-p392-combined-rvm.patch

After this is done you should be able to run gem install:

  $ gem install trepanning

If you are still on version 1.9 you need to specify an older version of trepanning. For example:

  $ gem install trepanning -v 1.93.35

Install from tarball

Look at the Ruby Debugger Runtime Project's Files section and download a tarball. Let's say you chose ruby-2.1.5-p273-debugger-1.2.tar.gz:

$ tar -xzpf ruby-2.1.5-p273-debugger-1.2.tar.gz
$ cd ruby-2.1.5-p273-debugger-1.2
$ ./configure && make
$ sudo make install-nodoc  # installs under ruby215d, gem215d...
$ gem215d install trepanning

For Ruby 1.9.3 you need to specify a version number in the 1.93 range. For example:

   $ tar -xzpf ruby-1.9.3-p551-debugger-1.2.tar.gz
$ cd ruby-1.9.3-p551-debugger-1.2
$ ./configure && make
$ sudo make install-nodoc  # installs under ruby193d, gem193d...
$ gem193d install trepanning --version 1.93.32
#                            ^^^^^^^^^^^^^^^^^

By default binaries have a suffix added so they don't conflict with the non-enhanced versions. Specifically, for Ruby 2.1.5 we add suffix 215d and for Ruby 1.9.3 we add suffix 193d to the following binaries:

  • gem (gem215d, gem193d)
  • ruby (ruby215d, ruby193d)
  • irb (irb215d, irb193d)
  • rake (rake215d, rake193d)
  • ri (ri215d, ri193d)

If you don't want the suffix, run configure with the --program-prefix=''. For example:

./configure --program-prefix=''

Note: on rvm no suffix is added or desired. rvm manages paths so there is no name conflict.

Try it!

$ trepan irb
-- (/usr/local/bin/irb:9)
require “irb” (trepan): # try: “help” or “quit” or EOF to leave