Closed mdallaire closed 3 years ago
I figured out how to run it in verbose and debug mode, I hope it helps :
root@aurora:~# ruby -v -d /usr/local/bin/aurora_monitor /dev/ttyUSB0
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux-gnu]
Exception `NameError' at /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:101 - undefined method `rubyforge_project=' for class `Gem::Specification'
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems.rb:1356 - cannot load such file -- rubygems/defaults/ruby
/var/lib/gems/2.7.0/gems/rmodbus-ccutrer-2.0.0/lib/rmodbus/rtu.rb:97: warning: mismatched indentations at 'end' with 'def' at 52
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85 - cannot load such file -- digest/crc16/crc16_ext
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:162 - cannot load such file -- digest/crc16/crc16_ext
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85 - cannot load such file -- digest/crc16_modbus/crc16_modbus_ext
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:162 - cannot load such file -- digest/crc16_modbus/crc16_modbus_ext
/var/lib/gems/2.7.0/gems/rmodbus-ccutrer-2.0.0/lib/rmodbus/sp.rb:3: warning: assigned but unused variable - e
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85 - cannot load such file -- serialport
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:162 - cannot load such file -- serialport
[WARNING] Install `serialport` gem for use RTU protocols
/var/lib/gems/2.7.0/gems/rmodbus-ccutrer-2.0.0/lib/rmodbus/client/slave.rb:271: warning: assigned but unused variable - err
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85 - cannot load such file -- 2.7/ffi_c
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:162 - cannot load such file -- 2.7/ffi_c
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85 - cannot load such file -- byebug
Exception `LoadError' at /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:162 - cannot load such file -- byebug
Traceback (most recent call last):
4: from /usr/local/bin/aurora_monitor:23:in `<main>'
3: from /usr/local/bin/aurora_monitor:23:in `load'
2: from /var/lib/gems/2.7.0/gems/waterfurnace_aurora-0.2.1/exe/aurora_monitor:77:in `<top (required)>'
1: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- byebug (LoadError)
root@aurora:~#
I installed both digest and serialport gems but still get the same error.
Interesting thing is I just tried aurora_mqtt_bridge and it works, it fetch the info from the tty and sends it to MQTT.
:sigh: I probably have a bunch of development-only dependencies I'm using from aurora_monitor. I'll try and fix it up by tomorrow afternoon. this is what I get when I've been running straight out of source control for forever, and not trying the installed gem.
0.2.2 just pushed to rubygems; hopefully aurora_monitor works for you.
OS: Ubuntu 21.04 server minimal fresh install Installed apt packages from official repo: build-essential ruby2.7 ruby-dev Installed using
gem install waterfurnace_aurora
I tried installing the serialport gem but got the same error afterwards so I removed it.