We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16de745 commit bb55d1cCopy full SHA for bb55d1c
tools/hardware/elm327_relay.rb
@@ -10,12 +10,20 @@
10
####
11
# This module requires a connected ELM327 or STN1100 is connected to
12
# the machines serial. Sets up a basic RESTful web server to communicate
13
-# Requires MSF and the serialport gem
+#
14
+# Requires MSF and the serialport gem to be installed.
15
+# - `gem install serialport`
16
+# - or, if using rvm: `rvm gemset install serialport`
17
18
19
20
### Non-typical gem ###
-require 'serialport'
21
+begin
22
+ require 'serialport'
23
+rescue LoadError => e
24
+ gem = e.message.split.last
25
+ abort "#{gem} is not installed. Please install with `gem install #{gem}' or, if using rvm, `rvm gemset install #{gem}' and try again."
26
+end
27
28
#
29
# Load our MSF API
0 commit comments