Ruby Environment
# Ruby Environment
## Local Environment Setup
If you want to set up the environment for the Ruby programming language, please read the content of this chapter. This chapter will explain all the important topics related to environment setup. It is recommended to study the following topics first before delving further into other topics:
: If you want to set up a development environment on Linux/Unix, then please refer to this chapter.
: If you want to set up a development environment on Windows, then please refer to this chapter.
: This chapter lists all the command line options that you can use with the Ruby interpreter.
: This chapter lists all the important environment variables that need to be set for the Ruby interpreter to work.
## Popular Ruby Editors
To write Ruby programs, you need an editor:
* If you are writing on Windows, you can use any simple text editor, such as VSCode or Edit plus.
* (http://vim.sourceforge.net/) (Vi IMproved) is a simple text editor that is available on almost all Unix systems and is now also available on Windows. Alternatively, you can use your preferred vi editor to write Ruby programs.
* (http://homepage1.nifty.com/markey/ruby/rubywin/index_e.html "RubyWin") is an Integrated Development Environment (IDE) for Ruby on Windows.
* Ruby Development Environment [(RDE)](http://homepage2.nifty.com/sakazuki/rde_en/ "RDE") is also a good Integrated Development Environment (IDE) for Windows users.
## Interactive Ruby (IRb)
Interactive Ruby (IRb) provides a shell for experimentation. Within the IRb shell, you can immediately see the result of each line as you type it.
This tool comes automatically with the installation of Ruby, so you don't need to do anything extra for IRb to work.
Just type **irb** at the command prompt, and an interactive Ruby session will start, as shown below:
$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> endnil irb(main):005:0> hello Hello Worldnil irb(main):006:0>
You don't need to worry about the execution content of the above commands for now; we will explain them to you in subsequent chapters.
## What's Next?
Assuming you have now set up the Ruby environment and are ready to write your first Ruby program. In the next chapter, we will explain how to write Ruby programs.
YouTip