You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
Whenever I overwrite the bundle's jar file with a newer version, openhab would reload the bundle, but when it reached the Gem.install part of the code, it would throw an BootstrapMethodError. After this, I'd need to restart openhab to recover. This error doesn't happen during the normal startup.
What's strange is if I call Gem.install afterrequire 'openhab', it would work fine. Move it just right before require 'openhab' and the same error will happen.
In fact this is what I found: if I go and edit openhab.rb (inside the gem_home/gems directory) and just have an empty file, this will still work:
require 'openhab' # this is located in the gem_home/gems/openhab-scripting-xxx but it is an empty file
Gem.install('openhab-scripting')
If I removed the require 'openhab', Gem.install will throw that BootstrapMethodError.
I can replace require 'openhab' with require 'httparty' (provided that httparty gem is installed on the system), and it would still work fine.
What I noticed is that require-ing something that's a part of the gem library would alter the LOAD_PATH, i.e. jruby will add the gem's lib directory into the LOAD_PATH. This is a standard behaviour from rubygems. I just can't figure out why after requiring something that lives inside gem_home, Gem.install would work.
It's a bit more complicated though. If I call Gem.install('a new gem that hasnt been installed') then it would fail regardless, but only after a bundle update. It would succeed on a fresh openhab restart.
The text was updated successfully, but these errors were encountered:
Whenever I overwrite the bundle's jar file with a newer version, openhab would reload the bundle, but when it reached the Gem.install part of the code, it would throw an BootstrapMethodError. After this, I'd need to restart openhab to recover. This error doesn't happen during the normal startup.
What's strange is if I call Gem.install after
require 'openhab'
, it would work fine. Move it just right beforerequire 'openhab'
and the same error will happen.In fact this is what I found: if I go and edit openhab.rb (inside the gem_home/gems directory) and just have an empty file, this will still work:
If I removed the
require 'openhab'
, Gem.install will throw that BootstrapMethodError.I can replace
require 'openhab'
withrequire 'httparty'
(provided that httparty gem is installed on the system), and it would still work fine.What I noticed is that require-ing something that's a part of the gem library would alter the LOAD_PATH, i.e. jruby will add the gem's lib directory into the LOAD_PATH. This is a standard behaviour from rubygems. I just can't figure out why after requiring something that lives inside gem_home, Gem.install would work.
It's a bit more complicated though. If I call Gem.install('a new gem that hasnt been installed') then it would fail regardless, but only after a bundle update. It would succeed on a fresh openhab restart.
The text was updated successfully, but these errors were encountered: