home PYTHONJAVA
 

Ruby Environment

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 installation on Linux/Unix: If you want to configure your development environment on Linux/Unix, then please Check out the contents of this chapter.

  • Ruby installation on Windows: If you want to configure your development environment on Windows, check out this section. content.

  • Ruby Command Line Options: This section lists all the command line options that you can explain with Ruby Use these command line options together.

  • Ruby Environment Variables: This section lists a list of all the important environment variables, setting these environment variables for Ruby The interpreter 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.
  • VIM (Vi IMproved) is a simple text editor that works on almost all Unix Available, now also available on Windows. Alternatively, you can use your favorite vi editor to write Ruby programs.
  • RubyWin is a Ruby for Windows Integrated Development Environment (IDE).
  • Ruby Development Environment (RDE) For Windows users, It is also a good integrated development environment (IDE).

Interactive Ruby(IRb)

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 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>

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.






welookups is optimized for learning.© welookups. 2018 - 2019 All Right Reserved and you agree to have read and accepted our term and condition.