Hi,
I’m trying to debug a problem in JRuby and I was trying to import JRuby
into my Eclipse workspace. But I failed completely.
What I tried
- Importing it using the ‘Import Maven Project’ functionality of
eclipse
=> failed, but I don’t have any experience with multi-module project
- then I saw that there is an Eclipse Project checked in, and I tried
to import it using ‘import-existing-eclipse-project’
-> eclipse complained about some missing ant classes (although they
are defined as a maven dependency). I fixed this by adding ant manually
with a user library
-> maven complained about some missing version number in the apache
waggon plugin configuration, I just added the latest version.
-> some erros about forbidden references (to com.sun.*) had to be
turned down to warnings (this happens quite often, so no biggie).
But then it got eclipse-ish weird, after these fixes it compiled but
when I run something (for example org.jruby.Main with a simple script)
it complained that there’s no class ‘org.jruby.Main’. I checked the
‘default output folder’ option and I was able to find a Main.class file
in this folder.
When I added the output folder ‘build.eclipse’ to the class path
manually (in the run configuration) it started, but failed soon after
with the strange error [1] (I guess there are some properties file, or
some other bootstrap things missing).
java.lang.NumberFormatException: For input string:
“@version.ruby.patchlevel@”
It can’t be that difficult, could somebody who’s working with eclipse
quickly outline how to get it running? I didn’t find anything in the
web.
Cheers & Thanks
Reto
[1] Exception:
RubyGlobal.java:165:in createGlobals': java.lang.ExceptionInInitializerError from Ruby.java:1076:in
init’
from Ruby.java:172:in newInstance' from Main.java:217:in
run’
from Main.java:128:in run' from Main.java:97:in
main’
Caused by:
NumberFormatException.java:48:in forInputString': java.lang.NumberFormatException: For input string: "@version.ruby.patchlevel@" from Integer.java:449:in
parseInt’
from Integer.java:499:in parseInt' from Constants.java:41:in
’
from RubyGlobal.java:165:in createGlobals' from Ruby.java:1076:in
init’
from Ruby.java:172:in newInstance' from Main.java:217:in
run’
from Main.java:128:in run' from Main.java:97:in
main’
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
maven is definitely not working as it is now. maybe we get something
like "import maven project via github’ which needs some work on jruby
side (the maven side is there) which is really nice to have - IMO.
regards Kristian
2010/5/16 Reto Schüttel [email protected]:
 → some erros about forbidden references (to com.sun.*) had to be turned down to warnings (this happens quite often, so no biggie).
Reto
Caused by:
To unsubscribe from this list, please visit:
  http://xircles.codehaus.org/manage_email
–
Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA
tel: +91 468 2319577
protect your privacy while searching the net: www.ixquick.com
_=_
q(-_-)p
'_) (_`
/__/ \
_(<_ / )_
(__\_\_|_/__)
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Hi Reto,
2010/5/16 Reto Schüttel [email protected]:
→ some erros about forbidden references (to com.sun.*) had to be turned down to warnings (this happens quite often, so no biggie).
But then it got eclipse-ish weird, after these fixes it compiled but when I run something (for example org.jruby.Main with a simple script) it complained that there’s no class ‘org.jruby.Main’. I checked the ‘default output folder’ option and I was able to find a Main.class file in this folder.
When I added the output folder ‘build.eclipse’ to the class path manually (in the run configuration) it started, but failed soon after with the strange error [1] (I guess there are some properties file, or some other bootstrap things missing).
java.lang.NumberFormatException: For input string: “@version.ruby.patchlevel@”
This should be the same problem as
http://jira.codehaus.org/browse/JRUBY-4419. I did encounter this
exception. I couldn’t figured out what’s wrong with that still now.
But, if you want to debug JRuby, JRuby Embed API would be a good
choice. Create a Java project and write Java code using JRuby Embed’s
API on Eclipse. While debugging, if you add JRuby’s source, you can
explore JRuby itself.
-Yoko
from Ruby.java:1076:in `init'
from Ruby.java:1076:in `init'
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Hi Reto,
I use Eclipse for JRuby debugging purposes regularly, and it’s been
working rather good for me so far. The only trick is to use remote
debugging.
So, in JRuby’s bin directory I have a file named jruby-debug.bat, with
the following content:
@jruby.exe -J-Xdebug
-J-Xrunjdwp:transport=dt_socket,server=y,address=3232,suspend=y %*
Then, I start whatever jruby script I wish, just instead of ‘jruby foo
bar baz’ I invoke jruby-debug … .
From within Eclipse, I start remote debugging, specify the port (3232,
the same as in jruby-debug.bat file) and that’s it, breakpoints work,
etc.
P.S.
Eclipse should open JRuby project just fine, all eclipse settings are
provided in JRuby’s repository. As you’ve mentioned, you just need to
add ANT lib to eliminate the broken dependency errors.
Thanks,
–Vladimir
2010/5/16 Reto Schüttel [email protected]:
→ some erros about forbidden references (to com.sun.*) had to be turned down to warnings (this happens quite often, so no biggie).
Reto
Caused by:
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email