How to Learn Ruby on Rails
- 16444 views
You’ve just taken your first steps in programming and you’re already facing a common problem: you just don’t know where to begin and what to learn first. However, you know what technology you want to work with: Ruby on Rails. Congratulations! You’ve decided to join a vibrant community of likeminded people.
Our RubyGarage team consists of people dedicated to the Ruby programming language, and we would like to help you in your quest to learn Rails. Follow our simple step-by-step guide and find out how to learn Ruby on Rails.
1. Ruby on Rails 101, or Master the Beginner Level
Here a few tools to help you learn the basics of front-end web development:
- The Intro to HTML and CSS course on Udacity doesn’t follow the structure of similar courses. This Udacity course gets you thinking like a real front-end developer: you won’t focus on a language’s syntax. Instead, you’ll learn how to convert design mockups to web pages step by step. What’s more, the course includes a chapter on responsive design techniques, something rarely taught within courses about HTML/CSS.
- The Make a Website course by Codecademy teaches you the fundamentals of CSS and HTML while you build your first website. The course is distributed for free, however, you can get additional features with a paid plan.
Learn Ruby Before Rails
Just to be clear, Ruby is a programming language, while Ruby on Rails (hint: you’ll sound more knowledgeable if you just say “Rails”) is a web application framework – a collection of pre-written code that simplifies website building. Rails extends the Ruby language and solves everyday problems so you don’t have to reinvent the wheel.
Beginner developers often wonder if they need to learn Ruby language first before moving to Ruby on Rails. We think you should. Our advice is to learn Ruby first. Of course, Rails offers great solutions out of the box; but when you face more serious issues, you’ll have to struggle with the Ruby code.
There are many ways to learn Ruby: online courses, books, video tutorials, and even mentorship programs. If you want to learn independently, you’ll probably dig into books and online courses, which are popular today. But remember: no matter how you learn Ruby, the way to succeed is to practice what you learn. A common mistake of beginners is gaining book knowledge without practicing: theory is great, but if you can’t put it into practice it’s not worth much.
We’ve picked out a few books and courses that’ll help you learn the basics of Ruby:
- Learn to Program (The Facets of Ruby Series) by Chris Pine. This is the book for complete beginners at programming. From writing your first single-line program to creating a basic video game, you’re guided carefully through the learning process. Learn to Program enforces that programming can be learned only by practicing.
Learn Ruby on Rails
Once you know all about Ruby, you can finally start learning Rails! Many novice developers are wondering why learn Ruby on Rails if there are other frameworks. However, the answer is clear: this web application framework is a perfect solution for startups thanks to its extensive out-of-the-box functionality, deployment speed and scalability. Let’s see what educational platforms can help you learn Ruby on Rails online and what books you should read to master the basics of RoR.
In general, online courses for Rails all look the same and offer the same products. We’ve picked out a few platforms that we personally like:
- Code School’s Rails for Zombies Redux courses. The playful name of this course shouldn’t fool you: you’ll learn CRUD principles, Active Record models and MVC architecture. This course is designed for those who already have some knowledge of programming, web development and Ruby. By the way – after successfully completing of this course you get a badge you can put on your CV.
- Codecademy’s Learn Ruby on Rails course is designed for beginner programmers. Codecademy is a platform for learning skills that you can apply in real life straight after completing a course. At Codecademy you’ll learn how to build a Flipboard-like home page and how to manage versions of your code with Git among plenty of other useful skills. Codecademy lessons combine theory with an in-browser simulator to practice coding. A small tip: take notes while reading the reference material to help you retain information.
We’ve also picked up a few books that our Ruby/Rails developers love and recommend.
- Agile Web Development with Rails 4 by Sam Ruby, David Thomas, and David Heinemeier Hansson. This is the ultimate guide to basics including Rails installation and architecture (models, views, and controllers). You’ll also learn a bit of Ruby before you create your very first storefront following the practical section of the book. Agile Web Development’s complexity increases gradually throughout the book. The Practical approach of this book is supported by story-driven chapters, iterative exercises and hand-holding narration.
- Ruby on Rails Tutorial by Michael Hartl. Many Ruby/Rails developers admit they’ve learned Rails by simply following Michael Hartl’s Rails tutorial. The book takes you by the hand and guides you through full cycle of web development: from coding best practices to writing tests. All the chapters are tied with exercises to practice what you’ve just learned; the main project is a Twitter-like app.
Get yourself a Ruby on Rails Mentor
Getting yourself a mentor is, probably, the best way to learn Ruby on Rails.. First, you’ll speed up your learning process by having someone beside you who can explain difficult concepts, review your code and guide you to better solutions. Second, a mentor is a source of support who won’t let you stumble on a problem or make the mentor’s previous mistakes. We at RubyGarage have developed a culture of mentorship in our teams to build closer relationships between junior and senior developers and accelerate learning.
2. Boost Your Skills: Ruby/Rails Intermediate Level
After you’ve learned the Ruby/Rails basics, you’ll probably want to go further and build more complicated applications with features like import/export of data, implementation of public/ private APIs and admin panels. Here are some resources to help you get there:
Become high-flying Rubyist
You shouldn’t underestimate the role of books in studying programming. Despite rapid development of technologies, good books on programming keep up with the times and are updated after new releases and updates. In order not to get lost in the many of books on Ruby and Rails, we’ve selected some especially good resources for you. Here are some books that contain information on extended Ruby features for the high-flying Rubyist:
- The Well-Grounded Rubyist (Second Edition) by David A.Black. This book assumes some programming background, however, you can always research unfamiliar concepts while you read. From the first to the last page Black introduces you to an object-oriented programming approach. For more experienced developers this book serves as a valuable reference; beginner Rubyists can get a great start from learning the basics (installing Ruby) to more advanced and dynamic Ruby features.
Practice Ruby on Rails
Practice makes perfect. At the beginning you’ll learn Ruby’s syntax and follow pre-written cases. But as you grow as a Rubyist, you need to put what you’ve learned into practice.
In order to deepen your knowledge, we recommend reading The Rails 4 Way by Obie Fernandez. This so-called “Bible” for Rails developers comes in the form of a reference book that you can refer to whenever you have any questions on a topic. Here you can find an answer to basically any question about Rails core. Readers also mark out in-depth narration and focus on practical chapters about gems and optimization of processes.
Join Ruby/Rails communities
Don’t forget that Ruby/Rails has one of the friendliest and most vibrant communities! Don’t miss the chance to join a group of people who will share insights and support you. Here are a few useful resources for you to connect with the Ruby/Rails community:
- StackOverflow and Quora. StackOverflow is for developers of all kinds: here you can ask any question related to a software development topic and get an enthusiastic response. Quora, on the other hand, is a platform for sharing insights in various areas. On Quora you can ask technical questions as well as less complicated questions such as what programming language you should learn.
- Ruby on Rails Link: Rails Slack community. Slack is an extremely popular messenger for teams. By joining a Slack team you can easily communicate with a whole bunch of people who are mad about Rails! Slack conversations are organized into topics that include Front-end, Coding, and Work (for those looking for a job).
- GitHub. Join an existing project on GitHub to polish your skills, connect with others and get invaluable experience while creating real software. Even if you aren’t able to write long strings of code, you can contribute to projects by fixing or rep. If you’re interested in finding out more about GitHub and its benefits, read our article about open source projects and their role in a developer’s life.
3. Advanced Ruby/Rails - still a long way to go!
Once you've learned the fundamentals of Ruby and Rails, you still have work to do. It’s important to build your own applications to get as much experience as you can; make mistakes and learn how to fix them; and get lost in concepts and find solutions. An inspiring example is Jennifer Dewalt who has built 180 websites in 180 days: every time you think you’re about to give up, think of her incredible aspiration.
As soon as you start writing your own code, it’s important to improve your output. Pay attention to coding best practices including DRY (Don’t Repeat Yourself), KISS (Keep It Simple, Stupid), and YAGNI (You Aren’t Gonna Need It) that allow you to write maintainable code and prevent you from reinventing the wheel and adding gold plating (unnecessary extra features).
In the future you’re probably going to build web applications as a part of a team. That’s why it’s essential to learn Git – a version control system to maintain your code and save the latest versions. Git is a useful programming practice since it helps you backup changes to your code and monitor your work progress.
Learning how to code is challenging, even though you can find plenty of resources that are crafted with diligence and passion. We’ve shared the books and websites we personally like and would recommend for individual study. But no matter what learning method you choose, remember to put theory into practice and get support from more experienced developers. Don’t ask yourself how long to learn Ruby on Rails; just set a goal and do your best to achieve it. Good luck!
Subscribe via email and know it all first!