user487743 user487743 - 1 year ago 86
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

Answer Source

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:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download