Hi,
I want to make a button inside my GUI that triggers a shell script. How can I do this?
Thanks!
Hi,
I want to make a button inside my GUI that triggers a shell script. How can I do this?
Thanks!
you need to put
def action_name
output = `/path/to/your/shell/script`
end
into an action that can be called from the gui. the backtick operator `` makes a system call and returns the standard output of your shell script.
UPD: This is the easy way. If you have a long running shell script you should consider using something like Delayed::Job