-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running pi_piper in Rails #40
Comments
Hi, As it is not advised to run a webserver as root, I will recommend you to escalate permissions only for a PiPiper dedicated process, there is an issue about it, but nothing as been properly written as of now. If you make any progress on this front keep us up to date. |
I'm not going to say it's the best idea performance becomes an issue when running the full rails stack but ... This is a site I wrote to do LED stuff: https://github.com/bguest/blinky... If you look at the pusher_example branch its pretty basic. Also, yeah, you need to deploy to root. |
So after much trial and error I end up installing everything as root. I could not get rails to write to GPIO pins with out installing ruby, rails, pi piper all as root. It works, but there has to be a better way other than installing as root. |
Looking for some advise or if anyone has been able to get a basic blinking light scenario website up and running using pi_piper. I'm starting as simple and basic as I can. Created a rails app and in my controller added same ruby code (that works when ran as ruby). Was expecting page I navigated to see lights blink, nothing fancy yet just wanted the code to execute. But i received a Permission denied error.
Error Message: Permission denied @ rb_sysopen - /sys/class/gpio/gpio23/direction
Anyone out there have experience with getting pi_piper to work with rails?
The text was updated successfully, but these errors were encountered: