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
|`openhab-scripting`| install the latest version of `openhab-scripting` gem |
196
199
|`openhab-scripting=~>5.0.0`| install the latest version 5.0.x but not 5.1.x |
197
-
|`openhab-scripting=~>5.0`| install the latest version 5.x but not 6.x|
200
+
|`openhab-scripting=~>5.0`| install the latest version 5.x but not 6.x. **This is the default/recommended setting.**|
198
201
|`openhab-scripting=~>5.0, faraday=~>2.7;>=2.7.4`| install `openhab-scripting` gem version 5.x and `faraday` gem version 2.7.4 or higher, but less than 3.0 |
199
202
|`gem1= >= 2.2.1; <= 2.2.5`| install `gem1` gem version 2.2.1 or above, but less than or equal to version 2.2.5 |
200
203
204
+
### bundle_gemfile <!-- omit from toc -->
205
+
206
+
A path to your Gemfile, including the file name.
207
+
It can be an absolute path, or just the file-name portion, in which case it will be resolved to `$OPENHAB_CONF/automation/ruby`.
208
+
The default is `Gemfile`.
209
+
210
+
If the Gemfile doesn't exist, the [gems](#gems) setting will take effect, and bundler will not be used.
211
+
212
+
The [bundler init console command](#console-commands) can be used to create a new Gemfile, or you can create it manually.
213
+
When this Gemfile exists, the [gems](#gems) setting will be ignored, and only the gems specified in your Gemfile will be installed and used.
214
+
215
+
Note that by default, the gems listed in the Gemfile will also be required, so it's not necessary to require them again in the [require](#require) setting.
216
+
To disable this behavior for a specific gem, add a `require: false` argument to the `gem` command within the Gemfile.
217
+
201
218
### check_update <!-- omit from toc -->
202
219
203
220
Check RubyGems for updates to the above gems when openHAB starts or JRuby settings are changed.
204
221
Otherwise it will try to fulfil the requirements with locally installed gems, and you can manage them yourself with an external Ruby by setting the same GEM_HOME.
205
222
223
+
This setting equally applies whether you're using bundler with [Gemfile](#bundle_gemfile) or the [gems](#gems) way of installing Ruby gems.
224
+
206
225
### require <!-- omit from toc -->
207
226
208
227
A comma separated list of script names to be required by the JRuby Scripting Engine at the beginning of user scripts.
@@ -1886,6 +1905,19 @@ script_unloaded do
1886
1905
end
1887
1906
```
1888
1907
1908
+
## Console Commands
1909
+
1910
+
Karaf Console commands are provided for performing maintenance and troubleshooting tasks.
1911
+
The commands are prefixed with `openhab:jrubyscripting` or just `jrubyscripting` followed by the sub-commands listed below:
0 commit comments