From: Robert Dober Date: 2009-07-20T19:01:34+09:00 Subject: Re: ruby IDE's On 7/20/09, Tom Cloyd wrote: > Sunil Kumar wrote: >> Hi This is sunil.. >> i am new to ruby technology... >> can anyone tel which IDE is good for running ruby programs.... >> > May I recommend that you learn to run it from the command line. It's not > at all hard. > > I've done several IDE's, and aside from the need to learn them, and > their bugs, they have the additional disadvantage of keeping you from > seeing what you're really doing. Amen (and even more so for beginners) the command line, and use the ruby-debug gem (not yet available in ruby > 1.9 Seems you are running an old version here, I happen to have good news :) 536/49 > cat test1.rb && ruby -vrdebug test1.rb puts 42 ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux] Debug.rb Emacs support available. test1.rb:1:puts 42 (rdb:1) help Debugger help v.-0.002b Commands b[reak] [file:|class:] b[reak] [class.] set breakpoint to some position wat[ch] set watchpoint to some expression cat[ch] (|off) set catchpoint to an exception b[reak] list breakpoints cat[ch] show catchpoint del[ete][ nnn] delete some or all breakpoints disp[lay] add expression into display expression list undisp[lay][ nnn] delete one particular or all display expressions c[ont] run until program ends or hit breakpoint s[tep][ nnn] step (into methods) one line or till line nnn n[ext][ nnn] go over one line or till line nnn w[here] display frames f[rame] alias for where l[ist][ (-|nn-mm)] list program, - lists backwards nn-mm lists given lines up[ nn] move to higher frame down[ nn] move to lower frame fin[ish] return to outer frame tr[ace] (on|off) set trace mode of current thread tr[ace] (on|off) all set trace mode of all threads q[uit] exit from debugger v[ar] g[lobal] show global variables v[ar] l[ocal] show local variables v[ar] i[nstance] show instance variables of object v[ar] c[onst] show constants of object m[ethod] i[nstance] show methods of object m[ethod] show instance methods of class or module th[read] l[ist] list all threads th[read] c[ur[rent]] show current thread th[read] [sw[itch]] switch thread context to nnn th[read] stop stop thread nnn th[read] resume resume thread nnn p expression evaluate expression and print its value h[elp] print this help evaluate (rdb:1) quit Really quit? (y/n) y and cat test1.rb && ruby -vrdebug test1.rb require 'debug' a = 41 @a = 42 ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux] Debug.rb Emacs support available. test1.rb:1:require 'debug' (rdb:1) s test1.rb:2: a = 41 (rdb:1) v l a => nil (rdb:1) s test1.rb:3:@a = 42 (rdb:1) v l a => 41 (rdb:1) quit Really quit? (y/n) y HTH Robert -- Toutes les grandes personnes ont d’abord été des enfants, mais peu d’entre elles s’en souviennent. All adults have been children first, but not many remember. [Antoine de Saint-Exupéry]