We will be setting up a Ruby on Rails development environment on Ubuntu 16.04 Xenial Xerus.
The reason we're going to be using Ubuntu is because the majority of code you write will run on a Linux server. Ubuntu is one of the easiest Linux distributions to use with lots of documentation so it's a great one to start with.Read more
We will be setting up a Ruby on Rails development environment on Mac OS X 10.11 El Capitan.
Older versions of OS X are mostly compatible so follow along as far as you can and then Google search for any problems you run into. There are plenty of people who have documented solutions for them.Read more
Ways of Installing Ruby
On Linux/UNIX, you can use the package management system of your distribution or third-party tools (rbenv and RVM).
On OS X machines, you can use third-party tools (rbenv and RVM). On Windows machines, you can use RubyInstaller.Read more
After reading this guide, you will know:
- How to install Rails, create a new Rails application, and connect your application to a database.
- The general layout of a Rails application.
- The basic principles of MVC (Model, View, Controller) and RESTful design.
- How to quickly generate the starting pieces of a Rails application.
The Rails philosophy includes two major guiding principles:
- Don't Repeat Yourself: DRY is a principle of software development which states that "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." By not writing the same information over and over again, our code is more maintainable, more extensible, and less buggy.
- Convention Over Configuration: Rails has opinions about the best way to do many things in a web application, and defaults to this set of conventions, rather than require that you specify every minutiae through endless configuration files.