Sikuli 1.1.0 error on OS X (JRuby)

Asked by Rick NA

I can't get Sikuli 1.1.0 to work on:

OS X 10.8
JRuby 1.7.3
Sikulix JRuby Gem
Java 7

After downloading and installing the lastest sikulisetup jar from nightly; everything installs fine. I've configured SIKULIXAPI_JAR env variable with the sikulixapi jar and verified it's been loaded in the $CLASSPATH but it seems Sikuli is having issues loading some classes.

I get the following error when running [require 'sikulix']

NameError: missing class or uppercase package name (`org.sikuli.script.Sikulix')
 from org/jruby/javasupport/JavaUtilities.java:54:in `get_proxy_or_package_under_package'
 from file:/usr/local/rvm/rubies/jruby-1.7.3/lib/jruby.jar!/jruby/java/java_package_module_template.rb:14:in `method_missing'
 from /usr/local/rvm/gems/jruby-1.7.3/gems/sikulix-1.1.0.3/lib/sikulix/sikulix.rb:13:in `Sikulix'
 from /usr/local/rvm/gems/jruby-1.7.3/gems/sikulix-1.1.0.3/lib/sikulix/sikulix.rb:7:in `(root)'
 from org/jruby/RubyKernel.java:1027:in `require'
 from /usr/local/rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1:in `(root)'
 from /usr/local/rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:36:in `require'
 from org/jruby/RubyKernel.java:1027:in `require'
 from /usr/local/rvm/gems/jruby-1.7.3/gems/sikulix-1.1.0.3/lib/sikulix.rb:4:in `(root)'
 from /usr/local/rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:1:in `(root)'
 from org/jruby/RubyKernel.java:1066:in `eval'
 from /usr/local/rvm/rubies/jruby-1.7.3/lib/ruby/shared/rubygems/custom_require.rb:60:in `require'
 from (irb):1:in `evaluate'
 from org/jruby/RubyKernel.java:1409:in `loop'
 from org/jruby/RubyKernel.java:1174:in `catch'
 from org/jruby/RubyKernel.java:1174:in `catch'
 from /usr/local/rvm/rubies/jruby-1.7.3/bin/jirb:13:in `(root)'irb(main):002:0>

I can't seem to figure out what the issue is.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Rick NA
Solved:
Last query:
Last reply:
Revision history for this message
rss (rssdev10) said :
#1

Sikulix with JRuby does not install gem. Run gem install sikulix manually.

Note: 1. You use old JRuby. 2. Methods onAppear, onVanish etc. are not available for Ruby with current sikulix_api.jar

Revision history for this message
Rick NA (richard-galaxys) said :
#2

I'm aware of that, I already have the gem installed and was using the Jruby gem when I got this error.

Revision history for this message
Rick NA (richard-galaxys) said :
#3

I solved my issue by installing Jruby 1.7.18 and reinstalling Java 7, now it works fine.