# Some questions about serious Ruby development

**URL:** <https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914>\
**Category:** Ruby\
**Created:** [July 11, 2006, 11:58am UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914 "2006-07-11T11:58:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 11, 2006, 11:58am UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/1 "2006-07-11T11:58:10Z")

</div>

I like Ruby. I like it more than Python. It’s my PERL replacement. I  
used to use PERL for automated file management but I have switched to  
Ruby  
because it is awesome and PERL blows. To be fair, I thought PERL was  
awesome at the time but it’s old news, now…

```
So, here I come, Ruby!

I'm starting to think that I can use Ruby for some serious software

```

development. I think a hardcore application can be written in a careful  
combination of Ruby and C++ (and some other stuff, too!). So, I did a  
bit  
of looking around which has only caused me to develop some questions…

```
Can anyone recommend a good IDE? Ah, the tired IDE question... I 

```

did a  
search on groups.google on this subject and, yes, it is a common  
question.  
However, every instance of it seems to have the same theme. Vi(m) is  
the  
greatest text editor out there (I found Emacs too hard to learn).  
Syntax  
highlighting is highly overrated and auto-completion is useless. What I  
need from an IDE is a debugger! Even if it were as simple as the  
ability to  
place breakpoints, step into and over lines of code, display evaluation  
results (like what IRB does), and list variables in scope. It would  
also be  
nice if it would let me evaluate methods of variables in scope, so I can  
try  
to get the state of various objects. Seriously, I’m tired of printf  
debugging (not that anyone uses printf in Ruby)…

```
Can anyone recommend a good... I don't know the proper term for this

```

but… a GUI toolkit? A widget toolkit? Something that allows me to  
create  
and manage windows and widgets to put in those windows. I’ll need the  
ability to create new (custom) widgets and it would be nice if it were  
cross  
platform…

```
Well, those are my questions, for now. I'll certainly be back if I 

```

have  
any more and I will, of course, continue to lurk here as well as answer  
the  
few questions I think I can answer competently! I’m really excited  
about  
doing some serious Ruby development and I look forward to whatever  
suggestions I get!  
Thank you for your help…

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 11, 2006, 12:40pm UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/2 "2006-07-11T12:40:45Z")

</div>

> What I need from an IDE is a debugger! Even if it were as simple as the  
> ability to place breakpoints, step into and over lines of code, display  
> evaluation results (like what IRB does), and list variables in scope.

You don’t say if you have Visual Studio. If so, you can try out our Ruby  
In  
Steel IDE. This has breakpoints, watch variables, locals, autos, step  
into/over, run to, evaluate in a command window, syntax error location  
plus  
code colouring/collapsing, Rails development tools etc. Not yet  
IntelliSense  
but we are working on that at the moment…

Download the latest here: [http://www.sapphiresteel.com](http://www.sapphiresteel.com)

best wishes  
Huw C.

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 11, 2006, 2:34pm UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/3 "2006-07-11T14:34:16Z")

</div>

On Jul 11, 2006, at 5:55 AM, Just Another Victim of the Ambient  
Morality wrote:

> need from an IDE is a debugger! Even if it were as simple as the  
> ability to  
> place breakpoints, step into and over lines of code, display  
> evaluation  
> results (like what IRB does), and list variables in scope. It  
> would also be  
> nice if it would let me evaluate methods of variables in scope, so  
> I can try  
> to get the state of various objects. Seriously, I’m tired of printf  
> debugging (not that anyone uses printf in Ruby)…

Just to take things in a whole different direction, are you using  
test driven development? I’ve found that TDD has eliminated a lot of  
my need for debugging. It’s a little like that printf debugging  
except that the printf’s become asserts and you don’t have to throw  
them away. They stay useful.

That being said, Eclipse’s RDT is supposed to handle debugging, but I  
haven’t had much luck with it so far.  
-Mat

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 11, 2006, 2:44pm UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/4 "2006-07-11T14:44:18Z")

</div>

On 7/11/06, Just Another Victim of the Ambient M.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Syntax highlighting is highly overrated and auto-completion is useless.

> What I need from an IDE is a debugger! Even if it were as simple as the ability to  
> place breakpoints, step into and over lines of code, display evaluation  
> results (like what IRB does), and list variables in scope. It would also be  
> nice if it would let me evaluate methods of variables in scope, so I can try  
> to get the state of various objects. Seriously, I’m tired of printf  
> debugging (not that anyone uses printf in Ruby)…

Two suggestions, check out the breakpoint gem – it is pretty much  
what you say you want from a debugger. If what you really want is a  
full IDE with a good integrated debugger, then you should check out  
ArachnoEdit ([ruby-ide.com](http://ruby-ide.com)). It is a commercial product, still in beta  
that seems to get developed in a series of sprints. It has a custom  
version of Ruby with a C extension for much faster debugging/stepping.

> ```
> Can anyone recommend a good... I don't know the proper term for this
> 
> ```
> 
> but… a GUI toolkit?

Check the archive, we _just_ had this discussion: FXRuby, QtRuby,  
wxRuby seem to be the primary choices.

pth

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 11, 2006, 3:18pm UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/5 "2006-07-11T15:18:44Z")

</div>

“Just Another Victim of the Ambient M.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
writes:

> What I  
> need from an IDE is a debugger!  
> ArachnoRuby dot.

Have a nice day  
Friedrich

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 11, 2006, 5:52pm UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/6 "2006-07-11T17:52:27Z")

</div>

Just Another Victim of the Ambient M. wrote:

> display evaluation results (like what IRB does)

I use the following method to do that:

 

def describe code

 
# takes a string to be eval’ed and prints it along with showing the
 

return value  
sep = ’ =\> ’  
begin  
result = eval(code)  
puts code + sep + result.inspect  
return result  
rescue Exception =\> e  
puts code + sep + e.to\_s  
return nil  
end  
end

 

I then can issue the following to get a nice printout, and also get the  
returned value of the statement. Example:

my\_array = describe “Range.new(1, 5).to\_a”

Would output “Range.new(1, 5).to\_a =\> [1, 2, 3, 4, 5]” and also assign  
my\_array properly.

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 11, 2006, 7:07pm UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/7 "2006-07-11T19:07:35Z")

</div>

John wrote:

> def describe code
> 
> # takes a string to be eval’ed and prints it along
> 
> # with showing the return value
> 
> sep = ’ =\> ’  
> begin  
> result = eval(code)  
> puts code + sep + result.inspect  
> return result  
> rescue Exception =\> e  
> puts code + sep + e.to\_s  
> return nil  
> end  
> end

Hi John,

You can write than method even more terse:

def describe code  
sep = ’ =\> ’  
result = eval(code)  
puts code + sep + result.inspect  
return result  
rescue Exception =\> e  
puts code + sep + e.to\_s  
# puts already returns nil  
end

Cheers,  
Daniel

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 11, 2006, 8:46pm UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/8 "2006-07-11T20:46:51Z")

</div>

Daniel S. wrote:

> > ```
> > puts code + sep + e.to_s
> > 
> > ```
> 
> ```
> result = eval(code)
> puts code + sep + result.inspect
> return result
> 
> ```
> 
> rescue Exception =\> e  
> puts code + sep + e.to\_s  
> # puts already returns nil  
> end

or perhaps even

def describe code  
out = eval(code).inspect  
rescue Exception =\> e  
out = e.to\_s; nil  
ensure  
puts code + " =\> " + out  
end

Cheers,  
Daniel

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 12, 2006, 4:23am UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/9 "2006-07-12T04:23:15Z")

</div>

Just Another Victim of the Ambient M. wrote:

> ```
> Can anyone recommend a good IDE?
> 
> ```

Check out xmp for vim for code evaluation and annotation:  
[http://eigenclass.org/hiki.rb?Enhanced+xmp+code+evaluation+and+annotation](http://eigenclass.org/hiki.rb?Enhanced+xmp+code+evaluation+and+annotation)

And the breakpoint library (ask Google where it is).

> ```
> Can anyone recommend a good... I don't know the proper term for this
> 
> ```
> 
> but… a GUI toolkit?

If you’ve used TK with Perl, you can use your existing TK knowledge  
with Ruby, too.

Cheers,  
Dave

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 13, 2006, 5:55am UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/10 "2006-07-13T05:55:34Z")

</div>

On Jul 11, 2006, at 2:45 PM, Daniel S. wrote:

> > > rescue Exception =\> e  
> > > return result  
> > > out = e.to\_s; nil  
> > > ensure  
> > > puts code + " =\> " + out  
> > > end
> 
> Cheers,  
> Daniel

def describe code  
require ‘xmp’  
xmp code  
end

I cheated though

---

<div class="post-metadata">

**Author:** ![maz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@maz](https://www.ruby-forum.com/u/maz)\
**Post date:** [July 12, 2006, 5:26am UTC](https://www.ruby-forum.com/t/some-questions-about-serious-ruby-development/97914/11 "2006-07-12T05:26:52Z")

</div>

On Jul 11, 2006, at 9:20 PM, removed\_email\_address@domain.invalid wrote:

> Just Another Victim of the Ambient M. wrote:
> 
> > ```
> > Can anyone recommend a good IDE?
> > 
> > ```
> 
> Check out xmp for vim for code evaluation and annotation:  
> [eigenclass.org](http://eigenclass.org/hiki.rb?Enhanced+xmp+code+evaluation+and)  
> +annotation

For those of you that use TextMate, this is now bundled with the  
editor as the Execute and Update ?# =\>? Markers command in the Ruby  
bundle menu.

James Edward G. II
