1

I just installed Shoes 4, but when I try the most basic program:

require 'shoes'

Shoes.app { button "test" }

It fails with this error:

NameError: uninitialized constant Shoes::Swt::App

I installed shoes using jruby -S gem install shoes --pre, like it says to on github. Why does Shoes.app give me a NameError?

Justin
  • 24,288
  • 12
  • 92
  • 142
  • Strangely, this is only when I run the program through ruby. When I use `shoes` from the command line, it works. – Justin Jun 25 '15 at 04:11

1 Answers1

2

project maintainer here. That's a clear sheos4 bug/regression - thanks for finding it. This should go to the bug tracker of the project - I opened an issue for it and set it for the next release.

In the meantime, please use the shoes launcher :)

Feel free to report such things directly in our repo (I'm not the most active person on StackOvewrflow) so we can find them quicker. :)

update: issue is fixed on master through this pull request

PragTob
  • 557
  • 2
  • 15
  • Okay, thank you very much. So I can expect this to be able to run using `ruby` sometime soon instead of `shoes`? I'd prefer to use ruby rather than the shoes launcher but okay, I will do this for now. – Justin Jun 29 '15 at 00:18
  • Yes you can expect that. The shoes launcher is advisable, though. There is a problem on mac - you have to start the JVM with a special start parameter (-J-X-StartonForstThread or something) otherwise Java SWT does not work. If you start it via ruby on max users would have to pass that flag along manually, the shoes launcher takes care of that already. – PragTob Jun 29 '15 at 15:57
  • issue was fixed in [this pull request](https://github.com/shoes/shoes4/pull/1147) – PragTob Jul 04 '15 at 08:03