Skip to content

Instantly share code, notes, and snippets.

@pradhumnsharma
Created April 19, 2018 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pradhumnsharma/50e4e1d844093b56c9f003581fe158f4 to your computer and use it in GitHub Desktop.
Save pradhumnsharma/50e4e1d844093b56c9f003581fe158f4 to your computer and use it in GitHub Desktop.
How to install rails on localhost?
Step 1:- Login as super user using command
=> sudo su
Step 2:- The ROR installation begins with installing RVM on the server. It is important to install the latest version of RVM on the system, this requires an installation of the CURL command. The following command does the job.
=> apt-get install curl
Step 3:- To proceed with the RVM installation, import the rvm.io public key in the server system using this command.
=> curl -#LO https://rvm.io/mpapis.asc
=> gpg --import mpapis.asc
Step 4:- Then download the RVM installer with curl and execute it (by piping the curl output to bash) using this command
=> curl -sSL https://get.rvm.io | bash -s stable
Step 5:- The next step is to build the RVM environment and to save the settings of this environment into current shell. This is done with the following command.
=> source /etc/profile.d/rvm.sh
Step 6:- Install the Ruby dependencies with the RVM command below:
=> rvm requirements
The following command lists the available ruby versions:
=> rvm list known
Step 7:- Using RVM makes the independent management of ruby versions an easy process. The command listed below installs the Ruby version 2.4.2
=> rvm install 2.4.2
Step 8:- In order for the applications to use Ruby, the default ruby version needs to be set. The following command sets Ruby 2.4.2 as default version.
=> rvm use 2.4.2 --default
Step 9:- Rails can be easily installed with the Ruby gem installer.
=> gem install rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment