Install Ruby On Rails: Quickest way
The quickest way of installing Ruby on Rails with rvm
is to run the following commands:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --rails
Now you will be prompted for password, please enter it. Now let us know what does above command means in short:
gpg
: This command will contact a public key server and requests a key associated with the given ID
\curl:
It will grab the utility to grab a script file from the rvm
website.
-s
: This command
indicates that the utility should operate in silent mode
Install Ruby On Rails: Long way
Following a long installation procedure, all you need to do is source the rvm
scripts by typing:
source ~/.rvm/scripts/rvm
You should now have a full Ruby on Rails environment configured.
Install Ruby On Rails: Specific Version
If you want to install specific version of Ruby On Rails then all you need to do is this:
rvm install ruby_version
Now when this installation is complete, then you can list the versions of Ruby that you want to install by typing command:
rvm list
Switch the versions by typing:
rvm use ruby_version
We can use various Rails versions with each Ruby by creating gemsets
and then installing Rails within those using the normal gem
commands:
rvm gemset create gemset_name # create a gemset
rvm ruby_version@gemset_name # specify Ruby version and our new gemset
gem install rails -v rails_version # install specific Rails version
Thats all!
Thanks for reading the blog.
0 Comment(s)