Call an application from Ruby

L

Luiz Macchi

Hi all, how to call an application from Ruby inside on Linux ?

I´d like to run 'KCalc' for example

thank any help
 
D

Daniel Lucraft

Luiz said:
Hi all, how to call an application from Ruby inside on Linux ?

I´d like to run 'KCalc' for example

thank any help

You can execute a system command by putting it between `backticks`. On
Gnome, the calculator command is gcalctool and this works for me:

dan: /home/dan$ irb
irb(main):001:0> `gcalctool`
=> ""

best,
Dan
 
B

brad

Daniel said:
You can execute a system command by putting it between `backticks`. On
Gnome, the calculator command is gcalctool and this works for me:

dan: /home/dan$ irb
irb(main):001:0> `gcalctool`
=> ""

You might also do this:

system('gcalctool')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,264
Messages
2,571,316
Members
48,001
Latest member
Wesley9486

Latest Threads

Top