Running Programs From A File
Goals
Step 1
Type this in the file my_program.rb:puts 'This code is in a file!' some_variable = 19 puts "I stored a variable with the value #{some_variable}!"
Step 2
Step 3
Type this in the terminal:lsExpected result:my_program.rbType this in the terminal:more my_program.rbExpected result:puts 'This code is in a file!' some_variable = 19 puts "I stored a variable with the value #{some_variable}!"
Step 4
Type this in the terminal:ruby my_program.rbExpected result:This code is in a file! I stored a variable with the value 19!
Explicación
Next Step:
Go on to Summary: Tools