Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Fwd: [Dltk-dev] How to configure jruby-complete.jar as interpreter runtime

P.S.: the issue occurs only in DLTK Debug mode (Debug as -> Ruby Script), in normal mode (Run as -> Ruby Script) everything is fine.


---------- Forwarded message ----------
From: Torben Knerr <ukio@xxxxxx>
Date: Tue, Mar 17, 2009 at 12:31 PM
Subject: Re: [Dltk-dev] How to configure jruby-complete.jar as interpreter runtime
To: DLTK Developer Discussions <dltk-dev@xxxxxxxxxxx>


Hi Alex,

here is the steps & code to reproduce the behaviour.
It seems that in DLTK Debug mode the output is gone right after JRuby complains that "SAFE levels are not supported in JRuby":


steps to reproduce:
===============
1. configure jruby-complete-1.1.6.jar as interpreter runtime (see previous emails)
2. configure Ruby Built-In Debugger as debugger
3. run code below in debug mode (Debug As -> Ruby Script)


example code to reproduce:
=====================

require 'logger'
require 'erb'

class Dummy
   
    def initialize

        @log = Logger.new($stdout)
        @log.level = Logger::DEBUG
        @log.datetime_format = "%H:%M:%S"   
        @log.info 'initializing test...'
    end
   
    def doStuff(param)
        @log.debug "doing some stuff with param #{param}..."
       
        #process using ERB
        erb = ERB.new("simple template parametrized with '<%= param %>'", 0, "%<>")
        result = erb.result(binding())
        @log.debug "result is: #{result}"
       
        @log.debug "did some stuff with param #{param}!"
    end
end

d = Dummy.new
10.times do |num|
    d.doStuff num
end


output looks like this:
=================

I, [12:20:59#3628]  INFO -- : initializing test...
D, [12:20:59#3628] DEBUG -- : doing some stuff with param 0...
D, [12:21:00#3628] DEBUG -- : result is: simple template parametrized with '0'
D, [12:21:00#3628] DEBUG -- : did some stuff with param 0!
D, [12:21:00#3628] DEBUG -- : doing some stuff with param 1...
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby
file:/W:/05_tools/.m2/repository/org/jruby/jruby-complete/1.1.6/jruby-complete-1.1.6.jar!/erb.rb:738 warning: SAFE levels are not supported in JRuby



Best regards,
Torben

P.S.: I could not find the option you are mentioning in the Debug settings, neither in "Dynamic Languages/Debug" nor in "Ruby/Debug".

 



On Mon, Mar 16, 2009 at 10:35 AM, Alex Panchenko <alex@xxxxxxxxx> wrote:
Hi Torben,

DLTK ruby-debug support does not yet work with JRuby, this bug is registered at https://bugs.eclipse.org/bugs/show_bug.cgi?id=259875

Regarding logging output could you please provide example code to reproduce this behavior?
Also in the debug configuration there is '[ ] Debug console redirection' option, could you try setting it to OFF.

Regards,
Alex

----- Original Message -----
From: "Torben Knerr" <ukio@xxxxxx>
To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
Sent: Wednesday, March 11, 2009 2:08:11 PM GMT +06:00 Almaty, Novosibirsk
Subject: Re: [Dltk-dev] How to configure jruby-complete.jar as interpreter runtime

Hi Andrei,

thanks for the fast response. It works as described, thanks!!!

Another question: now that I have the JRuby interpreter set up, is there any way to use the fast ruby debugger (ruby-debug)?

I noticed that using the Ruby Built-In debugger works, but it is
(a) painfully slow and
(b) for some reason my logging output is gone after part of the script has run

Regarding (b), I am using something like this:
@log = Logger.new($stdout)
@log.level = Logger::DEBUG
@log.datetime_format = "%H:%M:%S"
@ log.info 'blabalal'
The first few @ log.info |debug 'something' statements still print output, but then at some point it is gone...

Do you have a suggestion for this?

Thanks a lot and best regards,
Torben



On Wed, Mar 11, 2009 at 4:34 AM, Andrei Sobolev < andrei.sobolev@xxxxxxxxx > wrote:



Hi Torben,

DLTK has no support for using of jruby-complete at the moment.
But you could use it using bat file. Please create a bat file (jruby.bat) with following content:
java -jar jruby-complete-1.1.6.jar %*

And then add this file as new Ruby interepreter.
Also I have posted a bug to our issue tracked to improve this situation: https://bugs.eclipse.org/bugs/show_bug.cgi?id=268018

Best regards,
Andrei Sobolev.






Hi all,

I am using DLTK-Ruby v0.95.

Is there a possibility to configure the jruby-complete-1.1.6.jar as an interpreter runtime?
In the configuration dialog I am supposed to enter a runtime executable, but I have no jruby.exe, as I only have the jruby-complete.jar file.
When I tried to enter "java.exe" as the executable (wanting to -cp the jruby-complete.jar) it says "no Interpreter executables found".

Is that possible at all?

Thank you and best regards,
Torben

_______________________________________________
dltk-dev mailing list dltk-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dltk-dev

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev



_______________________________________________ dltk-dev mailing list dltk-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dltk-dev
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




Back to the top