Using Interactive Ruby (IRB)

See Also 

If you want to use the Interactive Ruby shell (IRB), you can start it in NetBeans by choosing Window > Other > Ruby Shell (IRB). IRB opens in a tabbed window at the bottom of the IDE in the same location as the Output window.

When you open the IRB window, the IDE uses the Ruby platform that is specified for the project you are editing. If you do not have any files open, then the Ruby platform that is specified for the main project is used. If the main project is not a Ruby project, the IDE uses the Ruby platform that is specified for the first opened Ruby project that is located.

At the IRB prompt, you type Ruby code and press Enter, and you see the results right away.

For example, type the following code:

   def hello; "hello world"; end; hello

Press Enter, and you see

   => hello world

You can also type each of these elements on a line by itself and press Enter to get the same result.

If you want to get more familiar with NetBeans IRB, here are a couple of tutorials to try with it:


See Also
Working With NetBeans Ruby
About Ruby Development in NetBeans

Legal Notices