A Complete Guide To Ruby On Rails, And Why You Should Learn It
We believe Ruby on Rails is one of the best way for beginners to get their hands dirty with code and build their own beautiful, fully-functioning, full-stack websites as quickly as possible.
Why so bold?
Well, finding ways to fast-track web development students into productive work is rather a hot topic. There are so many different ways to learn to code, and so many different web development languages to choose from, with seemingly everyone having their own opinions as to which is the best, easiest, or fastest to learn.
In this article we’re going to make a comprehensive case to start with the language Ruby on Rails, by answering any and all questions you might have about it.
Because there are so many different aspects to cover, if you want to skip ahead to the section that interests you most, just use the clickable menu:
1. Introduction to Ruby on Rails
We’ve found that Ruby on Rails is not only hugely sought-after in the tech industry, it’s a language and framework that’s also very accessible to people of varying skillsets and experience.
Crucially, it can be less off-putting than some other coding languages that demand a great deal of theoretical knowledge before you even write your first line of code.
Mark Lassoff, founder of LearnToProgram Media, puts it this way:
That’s the great thing about Ruby on Rails: it’s designed to get you building faster, so you can see the results of your hard work much more quickly. Before long you’ll be doing the thing you always wanted to be doing: building great websites. It’s also hugely in demand, and looks to be staying that way for the foreseeable future.
So why are we writing this post? As experts in this area, we get asked the same question from people the world over: “Should I learn Ruby on Rails?”
In this post we aim to answer that question, so that by the end you’ll not only know if this is the right course of learning for you, but also if it is, exactly how and where to learn it to launch a successful web development career.
So let’s get started with: What exactly is it?
2. What is Ruby on Rails?
Put simply, Ruby is a programming language, while Ruby on Rails is a framework that is built in Ruby. In developer circles “Ruby on Rails” is usually just referred to as “Rails”.
Essentially, it aims to simplify the creation of web applications. It does so by creating default structures for your code, your application’s database and the web pages your application will serve up to the client. Seeing as Ruby on Rails runs on a web server and serves up information to client programs (web browsers), it’s said to be a server-side or backend application.
David Heinemeier Hanson, the creator of the Ruby on Rails framework, said in an interview on the “This Developer’s Life” podcast that he chose Ruby as the programming language because it was concise, easy to use and supported high-level software engineering patterns he needed, unlike PHP, which he had experimented with.
Ikea shelf analogy
An easy way to think of the difference between Ruby and Ruby on Rails is to imagine building a bookshelf.
Ruby can be represented by somebody chopping down the trees, sawing the wood, carving the shelves and hammering in the nails or screwing in the screws.
Rails can be represented by an Ikea flat-pack bookshelf—all of the parts have been made, it is simply your job to assemble them correctly.
Ruby On Rails is an MVC framework
The MVC, or model-view-controller, framework is an architectural pattern used to create web and desktop applications.
Many other web frameworks use this pattern, such as AngularJS (JavaScript), Django (Python) and CakePHP (PHP). It structures code by separating the logic of the application into three interconnected parts.
The Model represents the logic of the application, the data objects, and high-level classes associated with them. The View is essentially the visual representation of the data (the template files, in other words).
Lastly, the Controller is the piece which connects the other two, responding to user input and gathering data from the Model to render in the View.
This pattern cleans up the application logic and makes Ruby on Rails applications very flexible.
3. The Ruby on Rails design philosophy
The design philosophy of this language is centered on certain key principles, as outlined in its Rails Doctrine, most notably:
- The Don’t Repeat Yourself (DRY) principle
- Convention over configuration
The DRY principle is a concept used everywhere in software development. It encourages programmers to reduce repetition in their code base and isolate functionality in small, easier to maintain functions or files.
This makes code modular, easier to understand, maintain, and debug. Ruby on Rails has taken advantage of one of Ruby’s features, called metaprogramming, in an effort to keep its code DRY.
The “convention over configuration” principle is at the center of how Ruby on Rails evolves over time. The term was introduced by David Heinemeier Hanson in an effort to explain the design philosophy he had chosen when developing Ruby on Rails while working at Basecamp.
“Convention over configuration” is a practice utilized by frameworks where they set “sensible defaults” rather than allowing developers complete control, thus freeing programmers from having to make certain decisions, allowing them to concentrate on building the application.
The most common example of “sensible defaults” is the naming conventions established in Ruby on Rails. Models are always named the singular proper noun of the object they represent, and corresponding database tables take the plural form. For example, if you have an object in your model named Product, the table in the database will automatically be named “products”.
This means programmers don’t have to think about such matters and they don’t have to spend a lot of time setting up configuration files just to get off the ground.
However, Ruby on Rails allows programmers to override these conventions where necessary to remain flexible. Programmers are then only responsible for the configurations that differ from Ruby on Rails’s conventions.
4. History of Ruby on Rails
Ruby on Rails was created by David Heinemeier Hanson, who extracted it from his work at Basecamp.
It was open sourced in 2004 and has kept growing and evolving ever since. Its core developer team now counts 11 members along with of hundreds of open source contributors. As it celebrates its latest version release 6.1.3.2, Ruby on Rails stands out as a long-standing web framework used by thousands of developers the world over.
5. What is the future of Ruby on Rails?
There have been murmurings on the internet for awhile now claiming that the Ruby on Rails framework is losing its popularity and relevance.
Why?
Well, there are multiple reasons for this, but the loudest complaints are that it’s not modern enough and that it doesn’t offer the features developers really need in the current climate.
However, things changed dramatically with Ruby on Rails 5, which addresses some of these concerns. The developer community around it has ensured that this release is not only loaded with new features to keep it up to date and interesting, but also that the framework is ready to evolve and embrace the future of technology.
Ruby on Rails 5 was the biggest release from the community since June 2013. It came with an impressive range of features and changes, including: real-time communication with ActionCable, API Mode to use Rails purely for a backend application, and simplified terminal commands.
Whichever way you look at it, things at Ruby on Rails are moving fast with many changes and developments ahead. Due to the very heavy involvement of the Ruby on Rails community and its open source nature, there’s no way that anyone using this programming framework will be left in the dark.
For the foreseeable future Ruby on Rails will remain one of the most exciting and innovative programming frameworks to know and work in.
And let’s not forget, programmers are extremely happy using Ruby on Rails, as Richard Schneeman of Schneems explains:
6. Why should I learn Ruby on Rails?
So now that you know what Ruby on Rails is, you probably have a whole host of other questions.
The big one is of course why.
Why should you learn Ruby on Rails? What are the advantages of learning Ruby on Rails over all the other programming languages out there? Will Ruby on Rails on its own be enough to build a career? Is it future-proof? How much previous experience do you need to learn it? What kind of company can you work in once you have these skills? And is it applicable to all web development jobs, or just a select few?
When you’re just beginning your research into a potential web development career, it can be hard to differentiate between the good advice and the bad, the expert and the amateur. In this section we want to clear things up a bit.
Over the course of the next few paragraphs we’ll be outlining why Ruby on Rails is a great first programming language to learn.
We’ll also look at the kinds of companies you can expect to land a job in with these skills, the stability of the industry and this career choice, and finally highlighting some of the most successful companies out there using Ruby on Rails to create engaging, high-functioning and creative websites.
Firstly, why is it so good for beginners?
A buzzing community
Ruby on Rails has developed a thriving online community of developers, both advanced and not-so-advanced, which is very welcoming to beginners.
This means that there is always a group of people to ask for help if you get stuck, or to help you find shortcuts to solutions.
For a beginner, this community provides general technical support, as well as reassurance that you’re not alone when you get stuck. This active community of developers are more than willing to help you with any issues that you may encounter.
If you’re looking for offline contact, you’ll find a large number of Ruby on Rails meetups and hackathons in cities worldwide. If you want to learn more about this, we have a full guide to what a hackathon is.
Mattan Griffel discusses the value of the Ruby on Rails community in his post “10 Reasons Beginners Should Learn Ruby on Rails”. He writes:
Apply what you’ve learned really quickly
Unlike Ruby, Rails is basically a collection of shortcuts written in Ruby which allows you to build web applications—basically websites—really quickly.
Because of this you’ll have a site you can use and share within a much shorter timeframe than if you built it all from scratch. The feeling of achievement is therefore a lot greater, you’ll encounter less frustration and you’ll quickly be able to see the results of all your hard work.
Web developer Michael Healy puts it this way:
Ruby on rails covers front- and backend
This language is pretty unique in that it covers both the front- and backend, meaning that as a Ruby on Rails developer you can describe yourself as truly full stack.
As a full-stack developer you can literally build an entire website without having to outsource to other developers or rely on other members of your team, which is a huge asset at a startup or as an entrepreneur.
This also means that you’ll get a chance to learn some other languages, for example HTML/CSS, JavaScript, and Ruby along the way. With other programming languages you would not usually get this opportunity.
The many Ruby on Rails job opportunities
Finding proficient Ruby on Rails developers is still not an easy task, with many unfilled developer jobs out there for the taking.
Don’t believe us? Why don’t you learn from our own graduates!
Former dancer-turned-Rails dev Kazia has an inspiring story about how she was able to study our Web Development Program with no prior experience, while raising her young daughter at the same time. After graduating, she got a job in a startup in Warsaw, Poland. Now she gets to enjoy the benefits of remote work, as well as the job progression and opportunities that Ruby on Rails offers.
With many buzzing startups using Ruby on Rails to build their sites, Rails developers are in massively high demand from both more established startups, as well as newer ones on the scene hoping to recreate the success of their peers.
Below is a list of just a few well-known startups built in Ruby on Rails:
Basecamp, Bleacher Report, Scribd, Groupon, Gumroad, Hulu, Kickstarter, Pitchfork, Sendgrid, Soundcloud, Square, Yammer, Crunchbase, Slideshare, Zendesk, GitHub, Shopify
Why do startups want their sites built in Ruby? Because, as we mentioned before, it’s full stack, so one developer can do both the front- and backend programming.
At a startup, the more skillsets you have, the more valuable you are to the company. An additional advantage for startups is that by building their site using Ruby on Rails they can get an MVP up and running very quickly.
Michale at Rails Tutorial discusses the value of having Ruby on Rails developers at both startups and larger companies alike:
Ruby on Rails is beginner-friendly
Ruby on Rails applications are largely written in Ruby, but despite that, there are numerous features that make it particularly straightforward for beginners to learn.
Rob Dey of Coder Manual tells us
Here are just a few examples of why Ruby on Rails is a good programming language for you to start with :
- Unlike Javascript and many other languages, you don’t need to remember to end your lines with a semicolon (;)
- Unlike Python and some other languages, whitespaces and indenting don’t matter. A lot of the time, you can leave out things like parenthesis () and curly brackets {} and your code will still work.
- Perhaps most significantly, Ruby is very readable as it uses plain English. This makes it a lot less intimidating when you’re approaching code for the first time.
Adam Fortuna, developer at Code School summed up the benefits of Ruby on Rails nicely for us:
In case you haven’t worked it out by now, Ruby is a great technology for junior developers to create impressive things quickly.
All you need to do is check out software engineer portfolios such as CareerFoundry graduate Matthew Primpas’s e-commerce project MARS. Combined with other beginner-friendly languages HTML/CSS and JavaScript, the result is a slick representation of an upscale menswear retailer website.
7. How to learn Ruby on Rails
Okay, so we’ve established that Ruby on Rails is a great first language to learn as a beginner in code. The next question we tend to get asked is, how do you learn it?
In this section we’ll be looking at all the different ways you can get to grips with Ruby on Rails and the pros and cons of all the different ways of learning, from online to offline, free to paid.
Free Resources
If you’re a complete beginner to coding and web development in general, then it’s only natural that you’ll want to try out some coding online before diving into a full time course.
Fortunately for you there’s been an explosion of websites offering completely free “in-browser” opportunities for you to try out Ruby on Rails without you even having to download any software.
Here is list of some free online courses we would highly recommend you try out before taking the plunge with a more formalized method of learning:
Pros:
- It’s a great way to see if coding in Rails is something you might enjoy, as either a hobby or a career. If you don’t enjoy it, it’s probably a big sign that you won’t want to take it any further. Much better to find that out now, before you spend any money on it!
- You can do it at your own pace, in your own time. No turning up to a school or university class. You can study when it’s convenient for you and set your own personal goals.
- It won’t cost you a penny, and you’re not committed to a program of learning.
Cons:
- Although free online exercises are a great introduction to the skills you might need to launch a career in web development, it’s unlikely you’ll be able to acquire all the necessary skills you’ll need to feel confident in applying for jobs as a junior web developer.
- You’re on your own. Unlike more formalized kinds of learning, with a free online class or video tutorial you won’t be supported through your learning by a teacher or mentor. You’ll need to make yourself accountable to yourself, and be responsible for your own success.
Imran Ghani of Web Development Help offers his tops tip to beginners starting out in code:
” Wanna learn Ruby? Start implementing a very basic example using an online tutorial. Enjoyed? Take a good online course in Ruby on Rails to get in-depth knowledge. Remember, practice makes perfect!”
Online Coding Schools
Once you’ve had the chance to try out some coding using one of the free options above, you’ll have a good idea of whether you’re ready to make the leap into a more structured learning environment.
There are a number of online schools who offer this. The price of these courses ranges significantly so take a look at our list of online coding schools for an idea of what’s available to you if you’re ready to fully commit to an online program of learning and begin your career in Ruby on Rails.
Pros:
- You can work anywhere, anytime. The huge advantage to online learning is that you don’t need to visit a classroom every day in order to take your classes! You can work on a beach, in a restaurant, in bed or on the train as long as you have a decent laptop and internet connection. This means that if you live in a small town which does not have a great university or evening classes available, your learning is not limited; you can get world class teaching at the click of a button.
- You’re not alone. Many paid, online courses offer expert mentors or teachers to guide you through your coursework. With these professionals on hand to answer your questions, you’ll feel more motivated, supported and ultimately you’re much more likely to succeed.
- Community. Structured online courses often include student communities that can further support and encourage you in your learning. You may also find peers with whom you can work on projects or collaborate with.
- Higher chance of success. Unlike learning online through multiple channels, with a structured course it is in the interest of the provider of that course for you to succeed. With that in mind, they will work hard to make sure you complete your exercises, finish your coursework and start getting work experience upon course completion—they are vying for your success.
- Cost. Although still a financial commitment, an online course can be a much more cost-effective way of learning about web development than an offline or university course.You will also save money on transport costs, as you can work entirely from home and not have to travel into a physical location every day.