Ruby on Rails Tutorial Michael Hartl

Review to one of the most popular Ruby on Rails tutorial
22 June 2017   4908
Ruby

A dynamic, open source programming language with a focus on simplicity and productivity.
 

Ruby on Rails

Ruby on Rails (RoR) - a framework written in the Ruby programming language.

When you will start to learn RoR, one of the first book that will be recommended to you is a Ruby on Rails Tutorial by Michael Hartl. This is one of the most popular newbie’s Ruby guide. At the moment, it has 6 editions and translated to many languages. It consists of 14 chapters and 744 pages. Thru these pages, Michael will teach you how to develop custom web applications, using the popular Ruby on Rails framework. It will also focus on the general principles of web development.

Ruby on Rails Tutorial by Michael Hartl
Ruby on Rails Tutorial by Michael Hartl

Author

Michael Hartl is former Y Combinator alumni, he has a Ph.D. degree in theoretical physics and he was teaching at Caltech. His book guides you through building a Twitter clone in Rails. This is the only Rails book that does test-driven development the whole time. This approach is highly recommended by the experts.

Michael Hartl
Michael Hartl

By including Git, GitHub, and Heroku in the demo examples, the author really gives you a feel for what it’s like to do a real-life project. The tutorial code examples are not isolated.

Book targeting

The book is targeted to a Rails newcomer, not a pro web developer, but general programming skills are needed. Author assume that you are a beginner, so, he will introduce whole Rails ecosystem to you. So, some time will be spent to install version control system called Git and text editors for coding.

What's inside

Inside Ruby on Rails Tutorial
Inside Ruby on Rails Tutorial

Building a Twitter clone by this book will be in a “hard way”, without a gem for user authentication. So, you will be involved in building different models (user, micropost and session), creating partials, passing information between different classes and handling errors.

A micro-blogging app is used to slowly, step-by-step walk through the different Rails features. The tutorial also explains some of the “magic” that goes on under the covers that Rails provides for you.  

Whole book is like a perfectly written program, modular, without any bugs or “empty code”. Author specify the exact versions of every gem, Rails and databases that are used. The book has zero errors, so, every time you will have a bug, it is an issue on your end.

True coder's habits

Usage of GitHub, Heroku, branching makes you feel like you are working on a real-life project, being a “real coder”. Number of gems, used in a test project is not very big, only the most common were used. Most of the things are made by hands.

Book is focused on testing. It starts from RSpec unit tests, then integration tests. TDD approach is followed for a long time where the tests come before the code, a practice that is commonly used by the coders. It will help you to create a good coder habits like running tests before and after merging a branch and refactor your code to reduce duplicates and increase application’s stability.  

Here is a good quote from the book:

If you ask five Rails developers how to test any given piece of code, you’ll get about fifteen different answers—but they’ll all agree that you should definitely be writing tests.
 

Michael Hartl
Ruby on Rails Tutorial

Also, Tutorial teaches you how to use Terminal properly. You will learn how to set up a sublime text shortcut, how to navigate file structures, create files and other shortcuts that will help you. Terminal will be your program associated with programming and technical expertise.

Conclusion

Ruby on Rails tutorial is a long course and it needs assiduity and diligence. But you can learn a lot from it.

It covers everything someone new to developing Ruby on Rails applications could need. It’s a good fit for people new to web development and new to Rails.

Ready to master Rails? Get this book. 

RubyMine 2018.2 to be Released

Great news for Ruby developers - new version of popular IDE available now
27 July 2018   199

Major summer update of the integrated development environment RubyMine from JetBrains under the number 2018.2 released. Among the innovations - improving the work with the code, support for new version managers, re-testing only for failed tests and much more.

Code analysis

The new version of IDE has received an improved type inference that allows to better read the types of elements in blocks, arrays and hashes. This feature improves code autocompletion and navigation throughout the project:

Element CompletionElement Completion

In addition, RubyMine now correctly recognizes models using polymorphic associations, and offers them full support for "smart" functions.

Version Managers

The updated development environment now supports chruby and asdf. Moreover, now all version managers are available in WSL, Docker, SSH and other remote connections.

Testing

RubyMine 2018.2 allows you to retest only those tests that have not been tested. According to the developers, this frees the user from manually viewing each failed check. The new function also works with the rake test and rake spec presets:

Rerun Failed Tests
Rerun Failed Tests

YAML

In this update, developers paid attention to the YAML data serialization format. Now its code can be formatted directly in the IDE and use all the functions of autocomplete and navigation by code. Moreover, the new version of RubyMine provides automatic filling of YAML data structures that have JSON Schema files, and the ability to copy / paste the key path to the value in .yml files.

Git

Support for version control in RubyMine 2018.2 has received several new features:

  • files with a merge conflict are now grouped in a separate node;
  • a new action Browse Repository at Revision allows you to examine the state of the repository after each revision;
  • It was possible to skip the Push action during the Commit and Push command or use it only for protected branches;
  • you can connect an unlimited number of accounts to GitHub and select the main one for each project.

Other improvements

In addition to general performance improvements, the new version of IDE brought new icons, a dark theme for MacOS, support for the Touch Bar, improved support for JS, TypeScript and CoffeeScript, which you can see in the overview of the WebStorm 2018.2 IDE update, and connect the debugger to remote processes without having to reboot .