Latest web development tutorials

Ruby Environment

Local environment settings

If you want to set the Ruby programming language environment, please read the contents of this chapter. This chapter tells you explain all the important settings and environment related topics. Recommended to study the following topics, then further study other topics:

  • Ruby Linux / Unix on the installation : If you want to configure the development environment on Linux / Unix, then view the contents of this chapter.

  • Ruby Windows on the installation : If you want to configure the development environment on Windows, then view the contents of this chapter.

  • Ruby command-line options : This section lists all of the command-line options that you can use with the Ruby interpreter and these command-line options.

  • Ruby Environment Variables : This section lists all of the important list of environment variables, set these environment variables so that the Ruby interpreter work.

Popular Ruby editor

In order to write Ruby programs, you need an editor:

  • If you were to write on Windows, you can use any simple text editor, such as Notepad or Edit plus.
  • The VIM (Vi IMproved) is a simple text editor, almost all are available on all Unix, can now also be used on Windows. In addition, you can also use your favorite vi editor to write Ruby programs.
  • RubyWin is a Ruby for Windows Integrated Development Environment (IDE).
  • Development Environment the Ruby (RDE) For Windows users, is also a good integrated development environment (IDE).

Interactive Ruby (IRb)

Interactive Ruby (IRb) for the experience provides a shell. In IRb shell, you can immediately see the progressive interpretation of the results.

This tool is installed automatically with Ruby with, so you do not need to do any additional things, IRb to work properly.

Only need to type in the command promptirb, an interactive Ruby Session will begin as follows:

$ Irb
irb 0.6.1 (99/09/16)
irb (main): 001: 0> def hello
irb (main): 002: 1> out = "Hello World"
irb (main): 003: 1> puts out
irb (main): 004: 1> end
nil
irb (main): 005: 0> hello
Hello World
nil
irb (main): 006: 0>

Here you can first do not care about the implementation of the contents of the above order, we will send you explain in subsequent chapters.

What will the next study?

Suppose now that you have set up the Ruby environment and are ready to write your first Ruby program. The next chapter we'll explain how to write Ruby programs.