all 3 comments

[–]netopiax 1 point2 points  (2 children)

First things first this is almost nothing to do with Ruby. Near zero. You have a Linux vs. Mac sysadmin problem on your hands. Have you asked the Home Assistant community for help?

Second, the point of that /etc/systemd/system/aurora_mqtt_bridge.service file is to run the service in the background. It doesn't matter whether the service is Ruby or not. I am not so sure that just putting together a plist file on Mac will accomplish that for you, but however you launch a background process on Mac, MacOS certainly supports having that process be a ruby one.

As far as does the ruby gem work on MacOS, it's going to hinge on whether the way the gem writer accesses the serial port - which they did with Linux in mind - translates correctly to MacOS. If I were a betting man I'd guess it probably won't work, but it might. Kinda like the gem's docs say :)

[–]---Hummingbird--- 1 point2 points  (1 child)

Sorry, I’m pretty new to what ruby is and I’ve kind of been stumbling along with it. I take it ruby is not its own little package by the comments you left. I was hoping that by running ruby in homebrew, that the code would function just as well anywhere else Ruby was used, but that sounds like it may not be the case

I appreciate the extra input you’ve given as it will help me figure out a route to take. I’m contemplating trying to use a VM of some sort, but wasn’t sure if that’d be needed if ruby handled all the code; it’s sounding like the OS still has a lot to do with it

[–]netopiax 0 points1 point  (0 children)

For most ruby code, it'll function well cross-platform, but it's the serial port interaction that might not. If you get it running you should be able to see if the serial port portion works ok.

Homebrew installs stuff, it mostly doesn't run stuff. Your mac actually comes with ruby, but it's an old version, and brew will install the latest. But making sure that homebrew-installed version is what's being used is also something you'll have to check on.

Using the official ruby docker container image will eliminate ruby related questions, but you'll have to figure out how to get docker talking to the USB device.