Reputation: 15129
Assume, I have a file 'text_file.txt' within my .rb script. How do I execute a default windows program for that file from the Ruby?
Upvotes: 1
Views: 2619
Reputation: 77995
From IRB:
system "start text_file.txt"
From a shell:
ruby -e 'system "start text_file.txt"'
Upvotes: 4