تشغيل أوامر نظام تعسفي من Ruby، على OSX و Windows
سؤال
أرغب في فتح OSX Windows (و Windows Windows) من برنامج نصي Ruby. إذا فعلت
system "touch /Users/apple/Documents/thekbase-temp-files/test5.txt"
يعمل (يخلق ملف فارغ)، ولكن هذا
system "mate /Users/apple/Documents/thekbase-temp-files/test5.txt"
لا يفتح TextMate، على الرغم من أنه يفعل ذلك إذا كتبته. أشعر أن هذا قد يكون نسخة من هذا السؤال لكنني أريد فقط أن أكون متأكدا.
شكرا!
المحلول
يحاول
system "open -a textmate /Users/apple/Documents/thekbase-temp-files/test5.txt"
لا تنتمي إلى StackOverflow