Ruby Associated Tools

Standard Ruby Tools:

The standard Ruby distribution contains useful tools along with the interpreter and standard libraries:
These tools help you debug and improve your Ruby programs without spending much effort. This tutorial will give you a very good start with these tools.
  • RubyGems is a package utility for Ruby which installs Ruby software packages, and keeps them up to date.
  • To help deal with bugs, the standard distribution of Ruby includes a debugger. This is very similar to gdb utility which can be used to debug complex programs.
  • irb (Interactive Ruby) was developed by Keiju Ishitsuka. It allows you to enter commands at the prompt and have the interpreter respond as if you were executing a program. irb is useful to experiment with or to explore Ruby.
  • Ruby profiler helps you to improve the performance of a slow program by finding the bottleneck.

Additional Ruby Tools:

There are other useful tools that don't come bundled with the Ruby standard distribution. However, you do need to install them yourself.
  • eRuby stands for embedded Ruby. It's a tool that embeds fragments of Ruby code in other files such as HTML files similar to ASP, JSP and PHP.
  • When you have a question about the behavior of a certain method, you can invoke ri to read the brief explanation of the method.

Ruby Predefined Constants

The following table lists all the Ruby's Predefined Constants.
NOTE: TRUE, FALSE, and NIL are backward-compatible. It's preferable to use true, false, and nil.
Constant NameDescription
TRUESynonym for true.
FALSESynonym for false.
NILSynonym for nil.
ARGFAn object providing access to virtual concatenation of files passed as command-line arguments or standard input if there are no command-line arguments. A synonym for $<.
ARGVAn array containing the command-line arguments passed to the program. A synonym for $*.
DATAAn input stream for reading the lines of code following the __END__ directive. Not defined if __END__ isn't present in code.
ENVA hash-like object containing the program's environment variables. ENV can be handled as a hash.
RUBY_PLATFORMA string indicating the platform of the Ruby interpreter.
RUBY_RELEASE_DATEA string indicating the release date of the Ruby interpreter
RUBY_VERSIONA string indicating the version of the Ruby interpreter.
STDERRStandard error output stream. Default value of $stderr.
STDINStandard input stream. Default value of $stdin.
STDOUTStandard output stream. Default value of $stdout.
TOPLEVEL_BINDINGA Binding object at Ruby's top level.

Site Search