<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:10pt"><div><span>The change you suggested works. </span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal; ">Thanks!</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal; ">Josep</div><div></div><div> </div><div>Josep M. Ferrandiz<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Detlev
 Offenbach <detlev@die-offenbachs.de><br> <b><span style="font-weight: bold;">To:</span></b> eric@riverbankcomputing.com; Josep Ferrandiz <josep_ferrandiz@yahoo.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 27, 2012 9:43 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Eric] eric4 and ruby<br> </font> </div> <br>
<div id="yiv1915099885">
<style type="text/css">
#yiv1915099885 p, #yiv1915099885 li {white-space:pre-wrap;}
</style><div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;">Ok, I think I understand the problem. The eric debugger backend is assigning its own handler for stderr and stdout in order to communicate their output back to the frontend (it is what you would see in the shell window). By your reopening you take stderr away from it and that causes the issue later on.</div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"> </div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;">Please try it with disabled stderr redirection. You may do this on a project basis (Project->Debugger->Debugger Properties) or more general via the configuration dialog, Ruby Debugger page.</div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"> </div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;">Regards,</div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;">Detlev<br><br>On Monday 26 November 2012, 15:40:56 Josep Ferrandiz wrote:<br></div>
<div style="margin-top:12px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;background-color:#ffffff;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">Detlev,</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">I have attached the file and have been able to isolate the lines that cause the problem:</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">$stderr.reopen("/dev/null", "w") and $stderr.sync = true.</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">They are in the function add_R_lib() that turns off $stderr while an R library is loaded that generates a bunch of warnings when loaded.</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">Thanks</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">Josep</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); "> </span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">Josep M. Ferrandiz<br></span></div>
<hr>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><span style="font-family: 'times new roman,new york,times,serif'; font-size: 12pt; color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;"><a rel="nofollow" name="yiv1725751280" href=""></a><span style="font-family: 'times new roman,new york,times,serif'; font-size: 12pt; color: rgb(0, 0, 0); ">C</span><span style="font-family: 'times new roman,new york,times,serif'; font-size: 12pt; color: rgb(0, 0, 0); ">an you send the script, that causes this issue. I might look at it (haven't used the Ruby debugger for years now).</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;"><span style="font-family: 'times new roman,new york,times,serif'; font-size: 12pt; color: rgb(0, 0, 0); "> </span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;"><span style="font-family: 'times new roman,new york,times,serif'; font-size: 12pt; color: rgb(0, 0, 0); ">Detlev<br><br>On Sunday 25 November 2012, 23:36:48 Josep Ferrandiz wrote:<br></span></div>
<div style="margin-top:12px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#ffffff;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">Hello,</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">I am using </span><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">Eric4 4.4.18 (r4127) with Ruby 1.8.7.</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">If I run a single ruby file on the command line in the Terminal view,</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">user@ubuntu:~/Code/ruby/RApps$ ./foo.rb</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">the file executes with no problem.</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">But if I run the same file through Eric's Run Script I get:</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">ruby 1.8.7 (2011-06-30) [i686-linux] on ubuntu, No Qt-Version</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">>>> /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:172:in `unhandled_exception': private method `sub' called for nil:NilClass (NoMethodError)</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:343:in `handleLine'</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">from /usr/share/eric/modules/DebugClients/Ruby/AsyncIO.rb:73:in `readReady'</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:619:in `eventLoop'</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:595:in `interact'</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:1172:in `main'</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">from /usr/share/eric/modules/DebugClients/Ruby/DebugClient.rb:44</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">in the interactive shell.</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">It also looks like the ruby debugger is not working. </span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); "><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;background-color:#000000;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); ">Any suggestions?</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); "> </span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:85px;margin-right:120px;text-indent:0px;"><span style="font-family: 'tahoma,new york,times,serif'; font-size: 10pt; color: rgb(0, 0, 0); ">Josep M. Ferrandiz</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;"><span style="font-family: 'times new roman,new york,times,serif'; font-size: 12pt; color: rgb(0, 0, 0); "><br><br>-- </span></div>
<div style="margin-top:12px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;"><span style="font-family: 'times new roman,new york,times,serif'; font-size: 11pt; font-weight: 600; color: rgb(0, 0, 0); ">Detlev Offenbach</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:45px;margin-right:80px;text-indent:0px;"><span style="font-family: 'times new roman,new york,times,serif'; font-size: 12pt; color: rgb(0, 0, 0); ">detlev@die-offenbachs.de</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><span style="font-family: 'times new roman,new york,times,serif'; font-size: 12pt; color: rgb(0, 0, 0); "><br><br></span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><br><br>-- </div>
<div style="margin-top:12px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><span style="font-size:11pt;font-weight:600;">Detlev Offenbach</span></div>
<div style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;">detlev@die-offenbachs.de</div></div></div><br><br> </div> </div> </blockquote></div>   </div></body></html>