launch app and get irb prompt back

S

seannakasone

How do i launch an external app from irb and get the irb prompt back
immediately.

For example, i want to launch my editor to edit a file in a popup
window, but want to continue using the irb session while the file is
being edited.

I tried this, but the irb session suspends until i close the gvim
editor.

irb(main):001:0> exec "gvim a.txt"
 
W

wrecklass1

How do i launch an external app from irb and get the irb prompt back
immediately.

For example, i want to launch my editor to edit a file in a popup
window, but want to continue using the irb session while the file is
being edited.

I tried this, but the irb session suspends until i close the gvim
editor.

irb(main):001:0> exec "gvim a.txt"

Don't use exec, use system:

irb(main):001:0>system "gvim a.txt"

works for me...
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top