Jruby scripting - installing Gems errors

Running OH 4.3.0 and just started getting this error now everytime I restart OH. I’m assuming it has to do with the GEM downloading an update?

I did uninstall the binding, removed the jruby directories and re-install but it keeps coming back.

I even put this in the jruby.cfg file so it wouldn’t try to download/update anything, but it still tries.

org.openhab.automation.jrubyscripting:false=check_update
org.openhab.automation.jrubyscripting:require=openhab/dsl

Any solutions?


2025-03-17 13:47:28.161 [WARN ] [yscripting.internal.JRubyScriptEngineConfiguration] - Error installing Gems
org.jruby.exceptions.RuntimeError: (RuntimeError) 

	you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command

no such file to load -- org/snakeyaml/snakeyaml-engine/2.9/snakeyaml-engine-2.9.jar
Did you mean?  org/snakeyaml/snakeyaml-engine/2.7/snakeyaml-engine-2.7 (LoadError)
	at RUBY.do_require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:356) ~[?:?]
	at RUBY.require_jar(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:265) ~[?:?]
	at RUBY.require_jar_with_block(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:307) ~[?:?]
	at RUBY.require_jar(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:264) ~[?:?]
	at RUBY.require_jar(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:363) ~[?:?]
	at RUBY.<main>(/etc/openhab/automation/ruby/.gem/9.4.9.0/gems/psych-5.2.3-java/lib/psych_jars.rb:5) ~[?:?]
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1187) ~[?:?]
	at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1216) ~[?:?]
	at RUBY.<main>(/etc/openhab/automation/ruby/.gem/9.4.9.0/gems/psych-5.2.3-java/lib/psych.rb:7) ~[?:?]
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1187) ~[?:?]
	at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:96) ~[?:?]
	at RUBY.load_yaml(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems.rb:610) ~[?:?]
	at RUBY.load_file(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/config_file.rb:346) ~[?:?]
	at RUBY.initialize(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/config_file.rb:189) ~[?:?]
	at org.jruby.RubyClass.new(org/jruby/RubyClass.java:922) ~[?:?]
	at RUBY.configuration(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems.rb:331) ~[?:?]
	at RUBY.connection(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/fetcher.rb:248) ~[?:?]
	at RUBY.initialize(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/fetcher.rb:94) ~[?:?]
	at org.jruby.RubyClass.new(org/jruby/RubyClass.java:922) ~[?:?]
	at RUBY.fetchers(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/source/rubygems.rb:290) ~[?:?]
	at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2803) ~[?:?]
	at RUBY.fetchers(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/source/rubygems.rb:288) ~[?:?]
	at RUBY.remote_specs(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/source/rubygems.rb:434) ~[?:?]
	at RUBY.build(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/index.rb:9) ~[?:?]
	at RUBY.remote_specs(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/source/rubygems.rb:433) ~[?:?]
	at RUBY.specs(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/source/rubygems.rb:131) ~[?:?]
	at RUBY.index_for(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/resolver.rb:137) ~[?:?]
	at RUBY.results_for(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/resolver.rb:145) ~[?:?]
	at RUBY.search_for(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/resolver.rb:108) ~[?:?]
	at RUBY.verify_gemfile_dependencies_are_found!(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/resolver.rb:232) ~[?:?]
	at org.jruby.RubyArray.map!(org/jruby/RubyArray.java:2835) ~[?:?]
	at RUBY.verify_gemfile_dependencies_are_found!(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/resolver.rb:228) ~[?:?]
	at RUBY.start(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/resolver.rb:31) ~[?:?]
	at RUBY.resolve(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:279) ~[?:?]
	at RUBY.resolve_remotely!(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:177) ~[?:?]
	at RUBY.resolve_if_needed(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/installer.rb:271) ~[?:?]
	at RUBY.run(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/installer.rb:82) ~[?:?]
	at RUBY.lock(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/process_lock.rb:12) ~[?:?]
	at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1197) ~[?:?]
	at RUBY.lock(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/process_lock.rb:9) ~[?:?]
	at RUBY.run(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/installer.rb:71) ~[?:?]
	at RUBY.install(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/installer.rb:23) ~[?:?]
	at RUBY.gemfile(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/inline.rb:58) ~[?:?]
	at RUBY.temporary(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/settings.rb:131) ~[?:?]
	at RUBY.gemfile(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/inline.rb:57) ~[?:?]
	at RUBY.temporary(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/settings.rb:131) ~[?:?]
	at RUBY.gemfile(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/inline.rb:50) ~[?:?]
	at RUBY.<main>(<script>:6) ~[?:?]
Caused by: org.jruby.exceptions.LoadError: (LoadError) no such file to load -- org/snakeyaml/snakeyaml-engine/2.9/snakeyaml-engine-2.9.jar
Did you mean?  org/snakeyaml/snakeyaml-engine/2.7/snakeyaml-engine-2.7
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1187) ~[?:?]
	at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:148) ~[?:?]
	at RUBY.do_require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/jar_dependencies.rb:353) ~[?:?]

Best, Jay

This should be

org.openhab.automation.jrubyscripting:check_update=false
1 Like

Did fix the syntax, but it’s still throwing that error from the original post on startups.

Best, Jay

@jwiseman we’ve released 5.36.1 to fix this issue. However, you will need to delete CONF/automation/ruby/.gem directory prior to restarting jrubyscripting or openhab to clear out the gems directory and start with a clean slate.

No changes in your gems config is needed

Here’s how I got the error to stop:

/services/ruby.cfg

org.openhab.automation.jrubyscripting:check_update=false
org.openhab.automation.jrubyscripting:gems=openhab-scripting=~>5.36.1
org.openhab.automation.jrubyscripting:require=openhab/dsl

Blew away /etc/openhab/automation/jruby directory

Restarted OH

Best, Jay

You should just revert the config to ~>5.0

And set check_update back to true