There are plenty of guides for you to follow if you need to install Ruby on Rails in Ubuntu. The easiest way is to use RVM. Earlier, we had to install RVM and then install Rails and the required dependencies separately. But RVM have just changed. A big update which will make things much more easier! But its a bit tricky!
As I said before, now you can use one command to install RVM, Ruby on Rails in Ubuntu and the dependencies. You don’t need to run rvm requirements and install the dependencies manually. This mean, you can’t use the old command to install RVM. Here’s how to do it in the right way…
How To Install Ruby on Rails in Ubuntu :
First of all, open the Terminal and go to Edit > Profile Preferences and select the tab Title and Command
In there’s tick “Run command as a login shell” and Close
Now, close and re-open the Terminal
Next, add the following commands to add Git and Nodejs PPAs and update the sources :
1 2 3
- Now install curl (required to install RVM) and build-essential (required to install some Gems) :
- Next run the following command to install RVM, Ruby on Rails in Ubuntu and the required dependencies. (remember to change the ruby version according to the latest rails version)
- Finally, install nodejs which might be needed for your Rails application:
Actually I had to refer to several sources in order to build these sets of instructions. I have used it to install Ruby on Rails in Ubuntu for several times. It always worked. But if you face any troubles following these steps, please leave them as comments!