user487743 user487743 - 3 months ago 9x
Ruby Question

How do I view a .rb (Ruby) file?

So we just learned Ruby in class today, and we are just starting to write our own scripts. So I just wrote a very simple "Hello World" app in Ruby. I saved the file as lab7.rb . So now my question is how do I view the output of the file? Do I open it in a browser? Thanks


You have to install the ruby interpreter in your machine.

If you're running in Linux or MacOS you probably have it already, try typing:

ruby lab7.rb

In windows download it here: