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.
Many people use rvm to allow multiple versions of Ruby and gems to coexist.
If you have rvm installed and want to try several steps in one shot, then run:
$ bash <<( curl 'https://sourceforge.net/p/ruby-debugger-runtime/code/ci/master/tree/patches/scripts/patch-ruby.sh?format=raw-tf') $ rvm use ruby-2.1.5-debugger $ gem install trepanning
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:
If you don't want the suffix, run configure with the
--program-prefix=''. For example:
$ trepan irb -- (/usr/local/bin/irb:9) require “irb” (trepan): # try: “help” or “quit” or EOF to leave