How to Execute simple Linux Command from controller?

Folks,

   I am new to rails and have not found out how to do this. What I am
trying to do is execute a Linux command from one of my controllers.
For example, I've tried these 2 methods. Both result in a the web-page
to hang forever. I get NO response back.

   The question I have is, how do I execute a Linux command and then
parse the output from this command to take further action. Much
appreciated.

def restore1
    render_text `uname -a`
  end

      or

def restore2
    io = IO.popen("uname -a")
    output = io.read
    io.close
end

Pete M.