Is it possible to execute a command on the server the rails app is residing on?
If so, how do I do it?
Update:
I mean executing a command like “kill 1999”, or “wget http://…” or “cat” etc., on Linux and similar commands on Windows.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is possible to execute any OS/System command from within ruby and thus from rails as well.
For example a directory listing could be done using
For more ways to run shell commands in ruby check this article