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

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
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    5/5   2078/2078 114.44/114.44

PHASE                                        ACTIONS
Removal Phase                                    2/2
Update Phase                                   23/23
Install Phase                              2482/2482
bleonard@opensolaris:~$ 

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... 72.5.124.56
Connecting to blogs.sun.com|72.5.124.56|: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]

bleonard@opensolaris:/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11$

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...
bleonard@opensolaris:~$ 

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.

Comments:

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.

Posted by Jeremy Nicoll on July 02, 2008 at 05:10 PM GMT #

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 ?

Posted by Sivaraj on August 16, 2010 at 10:48 PM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The Observatory is a blog for users of Oracle Solaris. Tune in here for tips, tricks and more as we explore the Solaris operating system from Oracle.

Connect with Oracle Solaris:


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20
21
22
23
24
25
26
27
28
29
30
   
       
Today