News, tips, partners, and perspectives for the Oracle Solaris operating system

Installing the Fast Ruby Debugger Engine (ruby-debug-ide)

Guest Author
To use the Fast Ruby Debugger with NetBeans you need to install the ruby-debug-ide gem (If you haven't installed Ruby, do that first). However, since that gem (among many others) uses native C extensions, gcc needs to be installed first:
bleonard@opensolaris:~$ pfexec pkg install SUNWgcc
Completed 5/5 2078/2078 114.44/114.44
Removal Phase 2/2
Update Phase 23/23
Install Phase 2482/2482

There's a bug where the rbconfig.rb file contains bogus paths (6705310) causing native extensions to fail to build. Prashant Srinivasan provides an updated rbconfig.rb via his blog, Where's my Ruby. Run:

bleonard@opensolaris:~$ cd /usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11/
bleonard@opensolaris:/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11$ pfexec mv rbconfig.rb rbconfig.rb.orig
bleonard@opensolaris:/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11$ pfexec wget http://blogs.sun.com/prashant/resource/gcc/rbconfig.rb
--17:54:04-- http://blogs.sun.com/prashant/resource/gcc/rbconfig.rb
=> `rbconfig.rb'
Resolving blogs.sun.com...
Connecting to blogs.sun.com||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6,864 (6.7K) [text/plain]
100%[==========================================================================================================================>] 6,864 --.--K/s
17:54:04 (52.83 KB/s) - `rbconfig.rb' saved [6864/6864]

Now the ruby-debug-ide gem should build successfully. However, NetBeans 6.1 does not work with the lastest version of ruby-debug-ide (0.2.0), so we have to explicity install version 0.1.0.

bleonard@opensolaris:~$ pfexec gem install ruby-debug-ide -v 0.1.10 --include-dependencies
Select which gem to install for your platform (i386-solaris2.11)
1. ruby-debug-base 0.10.0 (mswin32)
2. ruby-debug-base 0.10.0 (ruby)
3. Skip this gem
4. Cancel installation
> 2
Building native extensions. This could take a while...
Successfully installed ruby-debug-ide-0.1.10
Successfully installed ruby-debug-base-0.10.0
Installing ri documentation for ruby-debug-base-0.10.0...
Installing RDoc documentation for ruby-debug-base-0.10.0...

Now start NetBeans 6.1 and add the Ruby platform. Select Tools > Ruby Platforms to open the Ruby Platforms Manager:

If you haven't already added Ruby as a platform, click the Audodetect Platforms button:

You'll see that NetBeans has detected the that Fast Debugger is already installed. Happy debugging.

Join the discussion

Comments ( 2 )
  • Jeremy Nicoll Wednesday, July 2, 2008

    It's worth noting that other IDE's work with this debug gem as well. It seems that Komodo does as well, though I've not verified its capabilities yet.

  • Sivaraj Monday, August 16, 2010

    I installed ruby 1.8.4 with eclipse. But I am able to debug the ruby program. which version ruby-debug gem I need to install ?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Integrated Cloud Applications & Platform Services