From: Alex Gutteridge Date: 2007-05-25T13:42:14+09:00 Subject: Re: Ruby - Debugging On 25 May 2007, at 13:18, Jorge Domenico Bucaran Romano wrote: > It is not working look at this: > > 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) help > Debugger help v.-0.002b > [snip] > (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: syntax > error, unexpe > cted $undefined, expecting tSTRING_CONTENT or tSTRING_DBEG or > tSTRING_DVAR or tS > TRING_END > c:\users\jbucaran\desktop\demo2 > ^ > (rdb:1) Set breakpoint 1 at c:\users\jbucaran\desktop\demo2.rb:1 > C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10: warning: > parenthesiz > e argument(s) for future version > 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: syntax > error, unexpe > cted tIDENTIFIER, expecting $end > Set breakpoint 1 at c:\users\jbucaran\desktop\demo2.rb:1 > ^ > (rdb:1) > > -- > Posted via http://www.ruby-forum.com/. > It's telling you that there is a syntax error in the way you specified the filename. I don't use Windows so I can't test exactly, but it looks like enclosing the filename in quotes might help. Alternatively substitute backslash for forward slash. E.g: b "c:\users\jbucaran\desktop\demo2.rb":1 Also, don't type in this line: Set breakpoint 1 at c:\users\jbucaran\desktop\demo2.rb:1 That is output from the debugger. As to your question about whether it is necessary to run rubygems to use the debugger then the answer is 'it depends'. If your script uses gems then it is necessary, otherwise it isn't. I don't know anything about environment variables in Windows, so someone else will have to help you there. I would have thought that you should be able to get some information from Google. Alex Gutteridge Bioinformatics Center Kyoto University