Before testing Ruby applications in a local environment, you must prepare the environment. This topic describes how to configure a Ruby environment. It also provides download links for related tools.

Install Ruby

You can install Ruby by following the instructions provided in the Ruby official documentation. We recommend that you install Ruby 2.6.3. This is a stable version that is supported by Web App Service.


In Linux, the simplest method to install Ruby is to use a package manager. For example, you can use the following command to install Ruby on CentOS 7.

yum install ruby

If you want to install Ruby of the latest version or a specified version, you need to download the required source code version. Then, you need to extract the source code file, and use the following commands to compile and install Ruby.

make && make install

Use the following brew command to perform a quick installation of Ruby.

brew update && brew install go

If you are using Windows, you can use RubyInstaller to install Ruby.

Configure RubyGems

RubyGems is a package manager for Ruby. If you access the source repository of RubyGems from mainland China, the access speed is low. We recommend that you access mirror sites of the source repository to accelerate the access speed. You can use the following commands to configure RubyGems after Ruby is installed.

gem sources --add --remove
bundle config mirror.

Install an IDE

An integrated environment (IDE) provides comprehensive facilities. It allows developers to develop software and improve overall productivity. RubyMine is a common IDE for developing Ruby applications. We recommend that you download the IDE from the RubyMine (for commercial use) link.