I\'ve set everything up that I need on my Mac (Ruby, Rails, Homebrew, Git, etc), and I\'ve even written a small program. Now, how do I execute it in Terminal? I wrote the pr
Open Terminal
cd to/the/program/location ruby program.rb
or add #!/usr/bin/env ruby in the first of your program (script tell that this is executed using Ruby Interpreter)
#!/usr/bin/env ruby
cd to/the/program/location chmod 777 program.rb ./program.rb