Netbeans 6.5 instructions?

8 views
Skip to first unread message

ivanb

unread,
Nov 27, 2008, 6:55:54 AM11/27/08
to rawr-lib
Hi.

I have jruby project in Netbeans. Everything is installed via
netbeans.

How can I enable rawr for my project?

I tried to follow instructions, but it can't compile jar. Jar itself
isn't working.

A plugin for netbeans would be great!

bye,ivan

Logan Barnett

unread,
Nov 28, 2008, 12:17:42 AM11/28/08
to rawr...@googlegroups.com
Ivan,
I agree that a Netbeans plugin would be great. We'd love to have Rawr
part of JRuby proper as well. Fortunately, the more folks like you use
Rawr, the closer we get!

In the command line, cd into the project dir. Then type:
rawr install

Choosing option #1 will append rawr tasks via a require to your
Rakefile (if you already have one).
All that remains is to tweak build_configuration.rb to your specific
project.

Once you're all ready to go, go ahead and type this:
rake rawr:jar

That will create the jar, and place it in package/jar

Netbeans keeps its compiled stuff separately (I'm assuming you have a
Java project). Why not do everything through Rawr then? Netbeans has
the nice play button you can click (or F6) that just runs the app, and
will do any compiling of your Java classes/forms along the way. You're
not strictly required to use Netbeans for this, but it's mighty
convenient. The alternative is to run rake rawr:jar then cd to package/
jar, and do java -jar my-app.jar.

I hope that clears things up.

Ivan Bolčina

unread,
Nov 28, 2008, 3:53:18 AM11/28/08
to rawr...@googlegroups.com
I will try. :-) 
The problem with NetBeans and Jruby is, that it doesn't set up jruby environment, everything is done from netbeans. So I had problems even running rawr.

The other thing is, that I don't have Java project. I have ruby project in netbeans. Maybe this is the problem? Maybe I have to specially convert Ruby netbeans project into some other form?

Thanks for info. BTW, I believe that project like JRuby can succeede without packaging mechanism like Rawr. It's so much more better to give customer an exe file instead of all ruby environment.

2008/11/28 Logan Barnett <logu...@gmail.com>

Logan Barnett

unread,
Nov 28, 2008, 4:08:51 AM11/28/08
to rawr...@googlegroups.com
On Nov 28, 2008, at 1:53 AM, Ivan Bolčina wrote:

I will try. :-) 
The problem with NetBeans and Jruby is, that it doesn't set up jruby environment, everything is done from netbeans. So I had problems even running rawr.


Rawr should also run under vanilla/MRI Ruby. If it doesn't, please file a bug (:

The other thing is, that I don't have Java project. I have ruby project in netbeans. Maybe this is the problem? Maybe I have to specially convert Ruby netbeans project into some other form?

You're not strictly required to work in a Java project in Netbeans to do JRuby development, but it can help a lot, especially if you use jars, need to compile/use java files, or are using the Netbeans GUI editor. There's no formal project 'conversion' that I'm aware of. You can just delete the project files and create a new 'project with existing files'. If you go this route, you'll need to add your JRuby jar to the classpath.


Thanks for info. BTW, I believe that project like JRuby can succeede without packaging mechanism like Rawr. It's so much more better to give customer an exe file instead of all ruby environment.

JRuby does indeed do well without Rawr currently, but that's mostly for webapps (where Warbler is the desired build tool). There's also a lot of JRuby programmers out there who do the work by hand that Rawr already does. Rawr can also generate an executable jar, which isn't strictly an exe. This jar can be run on any system supported by Java. In order to generate a .exe or .app, we must make this executable jar first.

ivanb

unread,
Dec 3, 2008, 4:55:55 AM12/3/08
to rawr-lib
Hi. I managed to start building , and now i get exceptions like:

lib\ruby\activerecord-jdbc-adapter-0.9\src\java\jdbc_adapter
\JdbcAdapterInternal
Service.java:876: cannot find symbol
symbol : class IRubyObject
location: class jdbc_adapter.JdbcAdapterInternalService
private static String convertToStringOrNull(IRubyObject obj) {
^
lib\ruby\activerecord-jdbc-adapter-0.9\src\java\jdbc_adapter
\JdbcAdapterInternal
Service.java:883: cannot find symbol
symbol : class Ruby
location: class jdbc_adapter.JdbcAdapterInternalService
private static int getTypeValueFor(Ruby runtime, IRubyObject type)
throws SQ
LException {
^
lib\ruby\activerecord-jdbc-adapter-0.9\src\java\jdbc_adapter
\JdbcAdapterInternal
Service.java:883: cannot find symbol
symbol : class IRubyObject
location: class jdbc_adapter.JdbcAdapterInternalService
private static int getTypeValueFor(Ruby runtime, IRubyObject type)
throws SQ
LException {
^
100 errors
rake aborted!


Please help
> > 2008/11/28 Logan Barnett <logus...@gmail.com>

Logan Barnett

unread,
Dec 3, 2008, 1:32:30 PM12/3/08
to rawr...@googlegroups.com
Ivan,
Did you add jruby-complete.jar to your 'libraries' in Netbeans?
It's gotta be jruby-complete.jar, not jruby.jar, which I think is
missing some things we need.

Ivan Bolčina

unread,
Dec 5, 2008, 2:51:59 AM12/5/08
to rawr...@googlegroups.com
I don't have jruby-complete.jar, only jruby.jar. It didn't came with my windows installation of jruby.

Maybe it is a separate download?

2008/12/3 Logan Barnett <logu...@gmail.com>

Logan Barnett

unread,
Dec 5, 2008, 11:50:16 AM12/5/08
to rawr...@googlegroups.com
http://dist.codehaus.org/jruby/jruby-complete.jar
That'll get you the most stable release, which should be 1.1.5 (I think).
Other downloads are here: http://dist.codehaus.org/jruby/

James Britt

unread,
Dec 5, 2008, 11:56:33 AM12/5/08
to rawr...@googlegroups.com
Logan Barnett wrote:
> http://dist.codehaus.org/jruby/jruby-complete.jar
> That'll get you the most stable release,

No it won't.

> which should be 1.1.5 (I
> think).
> Other downloads are here: http://dist.codehaus.org/jruby/

http://repository.codehaus.org/org/jruby/jruby-complete/


is best.


--
James Britt

www.happycamperstudios.com - Wicked Cool Coding
www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

ivanb

unread,
Dec 8, 2008, 7:16:12 AM12/8/08
to rawr-lib
Thanks for info..

But no luck, I still receive all that errors. My installation of Jruby
is working correctly, but I still got all that errors.

I am a little lost here, any ideas what am I doing wrong?

bye


On Dec 5, 5:56 pm, James Britt <james.br...@gmail.com> wrote:
> Logan Barnett wrote:
> >http://dist.codehaus.org/jruby/jruby-complete.jar
> > That'll get you the most stable release,
>
> No it won't.
>
> > which should be 1.1.5 (I  
> > think
> > Other downloads are here:http://dist.codehaus.org/jruby/
>
> http://repository.codehaus.org/org/jruby/jruby-complete/
>
> is best.
>
> --
> James Britt
>
> www.happycamperstudios.com  - Wicked Cool Codingwww.jamesbritt.com          - Playing with Better Toyswww.ruby-doc.org            - Ruby Help & Documentationwww.rubystuff.com           - The Ruby Store for Ruby Stuff

Logan Barnett

unread,
Dec 8, 2008, 10:34:34 AM12/8/08
to rawr...@googlegroups.com
Do you have your code checked in somewhere?
Please doublecheck that jruby-complete.jar is listed in the
'Libraries' in Netbeans in the project view for your project. There
shouldn't be jruby.jar in there. If it is, remove the jruby.jar file.
You may want to do a clean build at that point.

JRuby in your project is independent of JRuby on your system. JRuby is
just a Java library in this case, and your Java program you're putting
together must see the library (jruby-complete.jar) in order to build.

If none of that works, try to get us your code/project somehow. If you
can't do that, then try to make a new project that reproduces the
problem.

Ivan Bolčina

unread,
Dec 8, 2008, 3:38:48 PM12/8/08
to rawr...@googlegroups.com
I understand finally now!
I reduced errors from 100+ to 18 by simply putting jruby-complete in lib/java dir.

I really appreciate you help!!!!

However, jdbc is still giving me trouble:

C:\Work\JAnime>rake rawr:jar
(in C:/Work/JAnime)
C:/Lib/jruby-1.1.5/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:
13:Warning: Gem::manage_gems is deprecated and will be removed on or after March
 2009.
lib\ruby\activerecord-jdbc-adapter-0.9\src\java\jdbc_adapter\JdbcAdapterInternal
Service.java:232: cannot find symbol
symbol  : class SQLBlock
location: class jdbc_adapter.JdbcAdapterInternalService
    private static IRubyObject withConnectionAndRetry(IRubyObject recv, SQLBlock
 block) {
                                                                        ^
lib\ruby\activerecord-jdbc-adapter-0.9\src\java\jdbc_adapter\JdbcAdapterInternal
Service.java:266: cannot find symbol
symbol  : class SQLBlock
location: class jdbc_adapter.JdbcAdapterInternalService
    private static SQLBlock tableLookupBlock(final Ruby runtime,

2008/12/8 Logan Barnett <logu...@gmail.com>

Logan Barnett

unread,
Dec 8, 2008, 5:03:26 PM12/8/08
to rawr...@googlegroups.com
Ivan,
This is where my usefulness to you will decline. I'm not so experienced with the JDBC adapter. What I have done in the past was found the jar(s) hidden within the JDBC adapter gem, copy/move it to lib/java, and make sure those are added to the classpath.

Here at Happy Camper Studios, we're working on a desktop app that needs database access. We ran into a lot of problems with some of the assumptions that ActiveRecord and friends make, so we started using the Sequel ORM, which has been working well for us after we worked on a little adapter for H2. I will defer to James and David, who are much more familiar with what's going on than I.
Reply all
Reply to author
Forward
0 new messages