Local Environment Settings
If you want to set up the environment for the Ruby programming language, read this section. This chapter will walk you through all the important topics related to environment settings. It is recommended to learn the following topics first, and then further study other topics:
Ruby establishment on Linux/Unix: If you need to arrange your advancement condition on Linux/Unix, at that point please Check out the substance of this section.
Ruby establishment on Windows: If you need to arrange your improvement condition on Windows, look at this segment. content.
Ruby Command Line Options: This area records all the direction line choices that you can clarify with Ruby Use these direction line choices together.
Ruby Environment Variables: This area records a rundown of all the vital condition factors, setting these condition factors for Ruby The mediator works.
Popular Ruby Editor
To write a Ruby program, you need an editor:
- If you're writing on Windows, you can use any simple text editor such as Notepad or Edit plus.
Interactive Ruby (IRb) provides a shell for the experience. Within the IRb shell, you can view the interpretation results line by line immediately.
This tool comes with Ruby installation, so you don't need to do anything else, IRb will work.
Just type irb at the command prompt and an interactive Ruby Session will start as follows:
$irb Irb 0.6.1(99/09/16) Irb(main):001:0> def hi Irb(main):002:1> out = "Hello World" Irb(main):003:1> puts out Irb(main):004:1> end nil Irb(main):005:0> hi Hello World nil Irb(main):006:0>
You can not care about the execution of the above commands first, we will explain to you in the following chapters.
What will be learned next?
Assume that you have now set up your Ruby environment and are ready to write your first Ruby program. In the next chapter we will show you how to write a Ruby program.