chetan / dht-sensor-ffi

A ruby library to read from a DHT-XX type humidity/temperature sensor
MIT License
26 stars 6 forks source link

Download/compile on OS X? #8

Closed siegy22 closed 5 years ago

siegy22 commented 5 years ago

Hey there, for development purposes I would like to install this gem on my OS X.

Did anyone else get this to work on OS X?

I fail terribly when trying to install the bcm2835: https://gist.github.com/siegy22/84b5d422d43ab06f26b6e9fcea1f4093

Obviously the bcm2835 isn't mean to be installed on OS X, but is there a way to simulate the GPIO api of /dev/mem?

chetan commented 5 years ago

You're probably better off doing some remote dev over ssh, mounting your files locally, or using something like VSCode's new remote support -

https://code.visualstudio.com/docs/remote/remote-overview

siegy22 commented 5 years ago

I'm using emacs and tramp has been doing it's job very well 😄

I ended up using a "soft require": https://github.com/siegy22/garden_messenger/blob/master/lib/garden_messenger/cli.rb#L29-L34

But thanks for the answer anyway 😄

pocopuede commented 5 years ago

Siegy22, I have the same problem as you, Mac OS X development and RPI for deployment with capistrano. Can you help me how to skip the compiling with native extensions or how to compile bcm2835 in Mac OS X without /dev/mem error? I have looking for enable /dev/mem on OS X, but I only have being able to activate /dev/kmem (https://apple.stackexchange.com/questions/114319/how-to-access-dev-mem-in-osx)

Thank you in advance

siegy22 commented 5 years ago

@pocopuede I just removed the gem from my gemfile and then installed it globally on my raspberry pi.