Home How to set up the environment of Ruby on Rails
Post
Cancel

How to set up the environment of Ruby on Rails

Install RVM and Ruby

RVM is used to manage different version of ruby. With RVM, you can switch between multiple different version of ruby. To install RVM, simply type the following command in the terminal

1
  $ \curl -sSL https://get.rvm.io | bash

or, more convenient, you can just install the RVM with stable ruby by using

1
  $ \curl -sSL https://get.rvm.io | bash -s stable --ruby

When you finish this step, you can type

1
  ruby -v

to check if the ruby is available.

Install Rails

Rails is the popular web framework based on ruby. With Ruby installed, you can install all of Rails and its dependencies through RubyGems on the command line:

1
  gem install rails

type

1
  rails -v

to check if the rails is available.

Here we go! Welcome to the world of Ruby on Rails