[Eric] eric4 and ruby
Josep Ferrandiz
josep_ferrandiz at yahoo.com
Tue Nov 27 19:22:14 GMT 2012
The change you suggested works.
Thanks!
Josep
Josep M. Ferrandiz
>________________________________
> From: Detlev Offenbach <detlev at die-offenbachs.de>
>To: eric at riverbankcomputing.com; Josep Ferrandiz <josep_ferrandiz at yahoo.com>
>Sent: Tuesday, November 27, 2012 9:43 AM
>Subject: Re: [Eric] eric4 and ruby
>
>
>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.
>
>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.
>
>Regards,
>Detlev
>
>On Monday 26 November 2012, 15:40:56 Josep Ferrandiz wrote:
>
>Detlev,
>
>
>I have attached the file and have been able to isolate the lines that cause the problem:
>$stderr.reopen("/dev/null", "w") and $stderr.sync = true.
>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.
>Thanks
>Josep
>
>
>
>Josep M. Ferrandiz
>
>________________________________
>
>
>
>Can you send the script, that causes this issue. I might look at it (haven't used the Ruby debugger for years now).
>
>Detlev
>
>On Sunday 25 November 2012, 23:36:48 Josep Ferrandiz wrote:
>
>Hello,
>
>
>I am using Eric4 4.4.18 (r4127) with Ruby 1.8.7.
>
>
>If I run a single ruby file on the command line in the Terminal view,
>user at ubuntu:~/Code/ruby/RApps$ ./foo.rb
>the file executes with no problem.
>
>
>But if I run the same file through Eric's Run Script I get:
>
>
>ruby 1.8.7 (2011-06-30) [i686-linux] on ubuntu, No Qt-Version
>>>> /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:172:in `unhandled_exception': private method `sub' called for nil:NilClass (NoMethodError)
>from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:343:in `handleLine'
>from /usr/share/eric/modules/DebugClients/Ruby/AsyncIO.rb:73:in `readReady'
>from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:619:in `eventLoop'
>from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:595:in `interact'
>from /usr/share/eric/modules/DebugClients/Ruby/DebugClientBaseModule.rb:1172:in `main'
>from /usr/share/eric/modules/DebugClients/Ruby/DebugClient.rb:44
>
>
>in the interactive shell.
>
>
>It also looks like the ruby debugger is not working.
>
>
>Any suggestions?
>
>Josep M. Ferrandiz
>
>
>--
>Detlev Offenbach
>detlev at die-offenbachs.de
>
>
>
>
>
>--
>Detlev Offenbach
>detlev at die-offenbachs.de
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20121127/6b9b0d0b/attachment-0001.html>
More information about the Eric
mailing list