Rails: Difference between revisions
From Kingside Wiki
| Line 4: | Line 4: | ||
;<code>system</code> | ;<code>system</code> | ||
: <code>system(“ls”)</code> | : <code>system(“ls”)</code> | ||
: | : '''system''' will print the command output as it happens | ||
: <blockquote> | : <blockquote>'''Note''' <code>system</code> will make your Ruby program '''''wait until the command is done'''''</blockquote> | ||
Revision as of 17:29, 2 March 2023
Run System Commands From Ruby
systemsystem(“ls”)- system will print the command output as it happens
Note
systemwill make your Ruby program wait until the command is done