From: Tomas Pospisek's Mailing Lists Date: 2007-05-25T17:35:49+09:00 Subject: Re: Ruby - Debugging On Fri, 25 May 2007, Alex Gutteridge wrote: > On 25 May 2007, at 16:50, Tomas Pospisek's Mailing Lists wrote: > >> On Fri, 25 May 2007, Alex Gutteridge wrote: >> >>> On 25 May 2007, at 15:42, Tomas Pospisek's Mailing Lists wrote: >>> >>>> On Fri, 25 May 2007, Jorge Domenico Bucaran Romano wrote: >>>>> C:\Users\jbucaran>ruby -rdebug c:\users\jbucaran\desktop\demo2.rb >>>>> Debug.rb >>>>> Emacs support available. >>>>> C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:require >>>>> 'rubygems' >>>>> (rdb:1) b "c:\users\jbucaran\desktop\demo2.rb" >>>>> C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:compile error >>>>> C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10: unterminated >>>>> string >>>>> meets end of file >>>>> (rdb:1) >>>>> I am sorry to bother like this, but is there any way I could get serious >>>>> documentation on how to use this, a good tutorial, maybe you can help me >>>>> here with a fine start. Please I can't believe it is so hard to do this. >>>> Did you ask Google? >>>> In your example above a file named "ubygems" is being parsed. Looks like >>>> non-sense to me? >>>> *t >>> >>> ubygems.rb is the way rubygems is loaded when you run: >>> >>> ruby -rubygems >> >> Where "-rXYZ" means: "Please ruby, load the library XYZ first please, >> before loading the actual program". And as can be seen above, ruby does >> actually find a file/library named "ubygems" at >> "C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb" which doesn't >> make any sense to me because (AFAIK) there doesn't exist and library named >> "ubygems" unless Jorge did something strange and placed something there. >> >> Or am I misstaken? >> *t > > ubygems *is* rubygems. This is getting off-topic, but ubygems.rb is the > reason you can write the aesthetically pleasing: > > ruby -rubygems foo.rb > > As well as: > > ruby -rrubygems foo.rb > > Note the double rr in the second one. Every installation of rubygems includes > ubygems.rb as far as I know. Try "locate '/ubygems.rb'" on your system. Ah, you're right, somehow I had missed that the last time I had run locate '/ubygems.rb. Thanks for the enlightening, *t -- ----------------------------------------------------------- Tomas Pospisek http://sourcepole.com - Linux & Open Source Solutions -----------------------------------------------------------