Spec doesn't work with JRuby and java classes

View: New views
4 Messages — Rating Filter:   Alert me  

Spec doesn't work with JRuby and java classes

by Piergiuliano Bossi-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I've been trying to run a spec file related to ruby code that drives java classes. While the spec works fine on the command line (using own jruby rake and setting the right classpath), I can't make it to work in NB. I've set up jruby classpath at the project properties level, but it seems to be ignored. According to previous suggestions in this forum, I've tried setting test.javac.classpath & spec.javac.classpath (even though I don't even know if this actually is used) in project.properties, but it doesn't make a difference.

What am I doing wrong?
I guess that for now I'm stuck at the command line.

I'm currently using NB 6.7.1 with jruby 1.3.1 under Mac OS/X 10.6.

Thanks,
Giuliano

--
Piergiuliano Bossi
Coming soon... http://ThinkCode.TV
http://thinkingbox.wordpress.com/
http://twitter.com/thinkingbox
http://stacktrace.it

Re: Spec doesn't work with JRuby and java classes

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Giuliano,

Piergiuliano Bossi wrote:

> Hi all,
>
> I've been trying to run a spec file related to ruby code that drives
> java classes. While the spec works fine on the command line (using own
> jruby rake and setting the right classpath), I can't make it to work
> in NB. I've set up jruby classpath at the project properties level,
> but it seems to be ignored. According to previous suggestions in this
> forum, I've tried setting test.javac.classpath & spec.javac.classpath
> (even though I don't even know if this actually is used) in
> project.properties, but it doesn't make a difference.

This setting works in 6.8 only; in 6.7 you can try setting the
JRUBY_EXTRA_CLASSPATH environment variable, that should get picked up by
the IDE. If that doesn't work, putting the required JARs to the lib dir
of the jruby installation you use should work as a a workaround. 6.8
will by default use the classpath specified in project properties for
running tests too.

Erno

>
> What am I doing wrong?
> I guess that for now I'm stuck at the command line.
>
> I'm currently using NB 6.7.1 with jruby 1.3.1 under Mac OS/X 10.6.
>
> Thanks,
> Giuliano
>
> --
> Piergiuliano Bossi
> Coming soon... http://ThinkCode.TV
> http://thinkingbox.wordpress.com/
> http://twitter.com/thinkingbox
> http://stacktrace.it


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Spec doesn't work with JRuby and java classes

by Piergiuliano Bossi-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Sep 9, 2009 at 3:27 PM, Erno Mononen <Erno.Mononen@...> wrote:
Hi Giuliano,


Piergiuliano Bossi wrote:
Hi all,

I've been trying to run a spec file related to ruby code that drives java classes. While the spec works fine on the command line (using own jruby rake and setting the right classpath), I can't make it to work in NB. I've set up jruby classpath at the project properties level, but it seems to be ignored. According to previous suggestions in this forum, I've tried setting test.javac.classpath & spec.javac.classpath (even though I don't even know if this actually is used) in project.properties, but it doesn't make a difference.

This setting works in 6.8 only; in 6.7 you can try setting the JRUBY_EXTRA_CLASSPATH environment variable, that should get picked up by the IDE. If that doesn't work, putting the required JARs to the lib dir of the jruby installation you use should work as a a workaround. 6.8 will by default use the classpath specified in project properties for running tests too.


Hi Erno,

I've tried with JRUBY_EXTRA_CLASSPATH but it doesn't seem to make a difference. I think I'll stick with the command line for now: my java classes are changing frequently and building a new jar every time would be inconvenient.

Out of curiosity, when should we expect NB 6.8 to be released as final? Sometimes in December? ==> http://wiki.netbeans.org/NetBeans68

Thanks
Giuliano

--
Piergiuliano Bossi
Coming soon... http://ThinkCode.TV
http://thinkingbox.wordpress.com/
http://twitter.com/thinkingbox
http://stacktrace.it

Re: Spec doesn't work with JRuby and java classes

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Piergiuliano Bossi wrote:

> On Wed, Sep 9, 2009 at 3:27 PM, Erno Mononen <Erno.Mononen@...
> <mailto:Erno.Mononen@...>> wrote:
>
>     Hi Giuliano,
>
>
>     Piergiuliano Bossi wrote:
>
>         Hi all,
>
>         I've been trying to run a spec file related to ruby code that
>         drives java classes. While the spec works fine on the command
>         line (using own jruby rake and setting the right classpath), I
>         can't make it to work in NB. I've set up jruby classpath at
>         the project properties level, but it seems to be ignored.
>         According to previous suggestions in this forum, I've tried
>         setting test.javac.classpath & spec.javac.classpath (even
>         though I don't even know if this actually is used) in
>         project.properties, but it doesn't make a difference.
>
>
>     This setting works in 6.8 only; in 6.7 you can try setting the
>     JRUBY_EXTRA_CLASSPATH environment variable, that should get picked
>     up by the IDE. If that doesn't work, putting the required JARs to
>     the lib dir of the jruby installation you use should work as a a
>     workaround. 6.8 will by default use the classpath specified in
>     project properties for running tests too.
>
>
> Hi Erno,
>
> I've tried with JRUBY_EXTRA_CLASSPATH but it doesn't seem to make a
> difference. I think I'll stick with the command line for now: my java
> classes are changing frequently and building a new jar every time
> would be inconvenient.

OK, I'll let you know if I can think of another workaround for this.

>
> Out of curiosity, when should we expect NB 6.8 to be released as
> final? Sometimes in December? ==> http://wiki.netbeans.org/NetBeans68

Yes, that's the plan.

Cheers,
Erno

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...