Ruby is a language and rails is a frame work written in ruby.Rails frame work allows a beginner to develope web application very easily and quickly.Rvm (Ruby version manager) gives the flexibility to use different ruby versions in one system.We can use the required ruby version without any conflicts by using ruby version manager.
Here is the steps I followed to install ruby and rails using rvm.
first update the apt repo, type “sudo apt-get update” in terminal.
install curl, “sudo apt-get install curl”, then install rvm using curl.
“\curl -L https://get.rvm.io | bash -s stable”
It will install latest stable rvm package in the system.Now rvm is installed in our system.To install its requirements and dependencies first we have to load rvm.Logout the current terminal session and open a new one and type the command to load the rvm,
“source ~/.rvm/scripts/rvm” .
Now to automatically install its dependencies, run
It will check the dependencies for the specific operating system (Here it is Debian) and start to install all the dependent packages.Now rvm is successfully installed in our system.
Next step is to install ruby.For that run the command,
“rvm install ruby”
It will install the latest version of ruby available in the online repo.After installation tell rvm to choose
the recently installed ruby version as the default ruby version by executing the command,
“rvm use ruby –default”
Now, to install rails we have to make sure that all requirements are there for the rails frame work.
So first we need to install gems by run this command,
“rvm rubygems current”
Finally every requirements are installed, now its time to install rails.
“gem install rails”
It will install rails frame work in our system.Now we can enjoy by developing web
applications very quickly with ruby-on-rails.
Happy Hacking… 🙂