Tuesday 29 April 2014

Installing Ruby on Rails on Linux Machine

You can follow the steps below to install ruby on rails on your linux machine.Open your terminal and follow the steps below.

First we are going to install curl,we will be fetching RVM by using curl.
sudo apt-get install curl

Installing RVM:-
RVM means ruby version manager it is used to maintain multiple ruby versions.It is highly recommended to use RVM  as sometimes you may want to use earlier ruby versions(ex:- 1.8.7,1.9.3) for older projects and current version for the latest projects(ex:- 2.1) and this problem is solved by RVM,you can refer the documentation for other versions and full details .

We can install RVM using the following command.

curl -L get.rvm.io | bash -s stable

In order to source the rvm scripts file we will be using this command. 

source ~/.rvm/scripts/rvm
This command will install the dependencies.

rvm requirements
you can get the list of ruby versions available by using

rvm list known
Now we can install the required ruby version with this command

rvm install RUBY_VERSION
ex:- rvm install 2.1.0
now we can check the ruby version installed by using

ruby -v

If you want to set ruby 2.1.0 as default ruby version then use

rvm --default use 2.1.0

As both RVM and some version of ruby are installed in our machine and we can proceed with installation of rails.
we can install rails by using the following command.

gem install rails

The above command will install the latest rails version,if you want to install some other version of rails you can use

gem install rails -v SOME_VERSION

ex:- gem install rails -v 3.2.11

That's it you can check your rails version using rails -v in your terminal.

Call Us – (203) 208 3081
Write us – sales@panzertechnologies.com.


No comments:

Post a Comment