How To Install Ruby on Rails on Ubuntu
Posted on Sunday, December 29, 2013
- Introducing New Server Networking FeaturesTuesday, March 10, 2015
- Getting started with Docker in minutes using Docker MachineFriday, February 20, 2015
- MEAN & Socket.IO Integration TutorialThursday, September 11, 2014
- Getting Started with MEAN StackWednesday, August 6, 2014
- Small Dive Into Meteor.JSMonday, July 21, 2014
- How to Add Swap on UbuntuMonday, December 30, 2013
- How To Deploy Django on Nginx, Gunicorn with PostgresTuesday, April 8, 2014
- Few CSS tricks you may not knowFriday, October 27, 2006
- CentOS 6 to CentOS 7 Upgrade ProcedureWednesday, July 16, 2014
- Fixing 403 Forbidden Nginx ErrorsSaturday, August 31, 2013
Ruby on Rails, often simply Rails, is an open source web application framework which runs on the Ruby programming language. It is a full-stack framework: it allows creating pages and applications that gather information from the web server, talk to or query the database, and render templates out of the box. As a result, Rails features a routing system that is independent of the web server.
Ruby on Rails emphasizes the use of well-known software engineering patterns and principles, such as active record pattern, convention over configuration (CoC), don’t repeat yourself (DRY), and model/view/controller (MVC).
This article applies to all releases of Ubuntu so it should help you to install Ruby on Rails on Ubuntu 12.04 LTS, 13.10 and any future releases. The majority of articles regarding this subject are release specific and very long. We’ll keep this one short and simple!
Update and Prepare System
It is important to make sure that your server is updated. On Ubuntu servers, you will need to run the following commands to update your repositories and your system. We’ll also need some basic requirements on your server.
$ apt-get update $ apt-get upgrade $ apt-get -y install curl
Install Ruby and Rails
We will be leveraging the RVM project to help us install the latest Ruby release. When we will install RVM, we will tell it to compile and install the latest Ruby release and download Rails as well.
$ curl -sSL https://get.rvm.io | bash -s stable --rails
RVM will automatically download, install and compile the latest release of Ruby. Once it’s done with that process, it will install the latest release of
rubygems which is required to install Rails. Afterwards, it downloads and installs Ruby on Rails on your server.
You can now use Ruby on Rails by typing the
rails command in your SSH shell, you will see output similar to the following:
Your Ubuntu machine now has the latest Ruby and Ruby on Rails installed on it without worrying about installing dependencies and complicated compilation processes, all it took was one short command!comments powered by Disqus