librelist archives

« back to archive

Windows XP 32 swt gem 0.16 not initializing Swt

Windows XP 32 swt gem 0.16 not initializing Swt

From:
Douglas Allen
Date:
2013-09-12 @ 01:00
From investigating why shoes4 won't run on my machine I've narrowed it down
to this problem first. I'm using jruby in pik. The gems all install into
C:\jruby-1.7.4\lib\ruby\gems\shared\gems after running jruby -S bundle
install
as per directions in the readme. Since this swt gem is installed and shoes4
won't run I used the examples\button.rb from
https://github.com/danlucraft/swt
clone. With line $:.unshift(File.expand_path("../../lib", __FILE__))
commented out to test the installed gem I get NameError: uninitialized
constant Swt
  const_missing at org/jruby/RubyModule.java:2631

Clearly this has to be resolved before I can even begin to use shoes4.

I just cloned shoes4 today and can see the first set of tests pass via
jruby -S rake spec
808 examples, 0 failures, 2 pending

The next set has too many failures to mention but I had put this line in
the
swt.rb of the gem lib after the requires.

 p Swt.constants

and I see it output in that second group
 [Coveralls] Outside the Travis environment, not sending data.

here:
[:Browser, :Layout, :CucumberRunner, :EventLoop, :VERSION, :DND,
:RRunnable, :SWT, :X64_BIT_CPUS, :Events, :Widgets, :Graphics, :Custom]

 just before Run options: exclude {:no_swt=>true}

So some spec test does find it. Any idea which one?

Windows XP 32 swt gem 0.16 not initializing Swt

From:
Douglas Allen
Date:
2013-09-12 @ 20:28
Something must be wrong with the way jruby finds it's  gems.

I built the shoes4 gem with jruby -S rake package and installed it to
C:\jruby-1.7.4\lib\ruby\gems\shared\gems\shoes-4.0.0.pre1

I can run things like the samples and spec tests from that directory.

The funny thing is that outside of that directory when I run any shoes apps
it doesn't complain about not being able to load the gem, it just says what
is not initialized. I'm at a loss for why this is so.

I will try to just install jruby again and see what happens.
But first does anybody know windows and how to use GEM_HOME and GEM_PATH? I
have other rubies installed and I use Ruby193 most often.
I had those variables set up to install all gems in its home. But now I've
disabled that I think because I get them in the jruby home. But I'm not
sure that I completely disabled it. Maybe not. Since that ruby requires
some environment variables of its own I could try shutting them off.

Oh! And I'm not running them with the binary shoes. I'm just requiring
'shoes'
gem. The binary still fails.

Re: [shoes] Windows XP 32 swt gem 0.16 not initializing Swt

From:
Eric Watson
Date:
2013-09-12 @ 20:41
Douglas,

Thanks for reporting this. We definitely want Shoes 4 to work seamlessly 
on Windows. I've opened a Github issue so we can track our progress on 
solving this issue:

https://github.com/shoes/shoes4/issues/427

It might have something to do with the way the Swt gem loads the Java libs
from JARs. I've run into a couple of funky problems there. Sounds like you
are making progress in finding out the cause of the problem. Nice work!

Eric

On Sep 12, 2013, at 3:28 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> Something must be wrong with the way jruby finds it's  gems.
> 
> I built the shoes4 gem with jruby -S rake package and installed it to 
> C:\jruby-1.7.4\lib\ruby\gems\shared\gems\shoes-4.0.0.pre1
> 
> I can run things like the samples and spec tests from that directory.
> 
> The funny thing is that outside of that directory when I run any shoes apps
> it doesn't complain about not being able to load the gem, it just says 
what is not initialized. I'm at a loss for why this is so.
> 
> I will try to just install jruby again and see what happens.
> But first does anybody know windows and how to use GEM_HOME and 
GEM_PATH? I have other rubies installed and I use Ruby193 most often.
> I had those variables set up to install all gems in its home. But now 
I've disabled that I think because I get them in the jruby home. But I'm 
not sure that I completely disabled it. Maybe not. Since that ruby 
requires some environment variables of its own I could try shutting them 
off.
> 
> Oh! And I'm not running them with the binary shoes. I'm just requiring 'shoes'
> gem. The binary still fails.

Re: [shoes] Windows XP 32 swt gem 0.16 not initializing Swt

From:
Douglas Allen
Date:
2013-09-14 @ 13:05
Thanks for the encouragement Eric.
A side note: Any prospects to make the cloned part just use vendored gems
untill all the bugs are out? I have dabbled some with this idea. Then I
don't have to install them yet. I'll get you some notes on this if you like.


On Thu, Sep 12, 2013 at 3:41 PM, Eric Watson <wasnotrice@gmail.com> wrote:

> Douglas,
>
> Thanks for reporting this. We definitely want Shoes 4 to work seamlessly
> on Windows. I've opened a Github issue so we can track our progress on
> solving this issue:
>
> https://github.com/shoes/shoes4/issues/427
>
> It might have something to do with the way the Swt gem loads the Java libs
> from JARs. I've run into a couple of funky problems there. Sounds like you
> are making progress in finding out the cause of the problem. Nice work!
>
> Eric
>
> On Sep 12, 2013, at 3:28 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
> > Something must be wrong with the way jruby finds it's  gems.
> >
> > I built the shoes4 gem with jruby -S rake package and installed it to
> > C:\jruby-1.7.4\lib\ruby\gems\shared\gems\shoes-4.0.0.pre1
> >
> > I can run things like the samples and spec tests from that directory.
> >
> > The funny thing is that outside of that directory when I run any shoes
> apps
> > it doesn't complain about not being able to load the gem, it just says
> what is not initialized. I'm at a loss for why this is so.
> >
> > I will try to just install jruby again and see what happens.
> > But first does anybody know windows and how to use GEM_HOME and
> GEM_PATH? I have other rubies installed and I use Ruby193 most often.
> > I had those variables set up to install all gems in its home. But now
> I've disabled that I think because I get them in the jruby home. But I'm
> not sure that I completely disabled it. Maybe not. Since that ruby requires
> some environment variables of its own I could try shutting them off.
> >
> > Oh! And I'm not running them with the binary shoes. I'm just requiring
> 'shoes'
> > gem. The binary still fails.
>
>