title: How to check for root prvileges from the user in Ruby?
body: <p>I'm trying to write a program that requires root privileges, but whenever it runs it raises an permission error. Is there a better way to run programs as root without entering <code>sudo 'example_script.rb'</code> Also, is there a possibly a way to request `sudo' from inside a ruby script or to check to see if a user is running as sudo when using the program? Thanks!</p>