Running Programs From A File
Goals
- Write a ruby program into a file
- Execute a ruby program stored in a file
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 19!"
Step 2
Type this in the terminal:ruby my_program.rb
Explanation
Next Step:
Go on to Conditionals