Rails: Difference between revisions

From Kingside Wiki

Line 1: Line 1:
=== Run System Commands From Ruby ===
=== Run System Commands From Ruby ===
[https://www.rubyguides.com/2018/12/ruby-system/|Ruby Guides]
[https://www.rubyguides.com/2018/12/ruby-system/| Ruby Guides]


;<code>system</code>
;<code>system</code>

Revision as of 17:30, 2 March 2023

Run System Commands From Ruby

Ruby Guides

system
system(“ls”)
system will print the command output as it happens

Note system will make your Ruby program wait until the command is done