Ruby programming: Beginner's guide

We are writing this brief tutorial on how to easily get into Ruby programming language and Ruby on Rails framework so our community can grow with new developers.

First thing first. Ruby on Rails framework is based on Ruby programming language, and the learning should start from there.

Our recommended steps:

Ubuntu installation instructions

We choose to develop on Linux OS, Ubuntu distribution. In order to install Ruby and Rails, you could follow these instructions (it might not be always up-to-date)

Ruby starting guide:

https://www.codecademy.com/learn/ruby

The whole session lasts around 8-9 hours, and it’s very nice time investment.
Also, you can find a bunch of stuff in Ruby docs. For example, you want to see what can you do with a string - just open Ruby docs for String class and see the list of all methods that you can use, with their documentation (example link https://ruby-doc.org/core-2.2.0/String.html).

Once you learned Ruby, it’s time to move on to Rails framework.

Firstly, you can just watch this basic 10-minute video.

https://www.youtube.com/watch?v=4nyzl3pVXp4

You are going to build your first Rails app yourself. You can ignore section from 1.4 or everything related to Git and Heroku (at the moment).

http://tutorials.jumpstartlab.com/projects/blogger.html  

Rails app with Rspec tests. In the tutorial they use Postgres as a database, you can still use SQLite, and no need to configure ‘pg’.

http://tutorials.jumpstartlab.com/projects/contact_manager.html

Once you have finished building these two apps, you are going to speed up through Rails basics.

More advanced stuff

Here are 5-day Rails tutorials. Most of them you can just read after completing previous 2 tutorials. Things that are new to you, you can practice on existing apps.

http://tutorials.jumpstartlab.com/paths/advanced_rails_five_day.html

Database relations

Database relations are very important. We are sharing two tutorials that we find easy to understand.

Testing

Testing our own code in Ruby on Rails is very important. Not every good developer writes it, it also leaves you out of hassle to manually click 50x on same feature over and over. You can just run the test suite you wrote, and it will tell you that everything is good with you code in the matter of minutes.

Our (free) tutorials of choice:

Firstly you could try with:

https://www.codeschool.com/courses/testing-with-rspec

And then,

http://blog.teamtreehouse.com/an-introduction-to-rspec

To see how tests run in real world example you could watch this example:

http://railscasts.com/episodes/275-how-i-test

At the end, in order to improve your testing skills, you should go to

http://betterspecs.org/.

Additional resources

In order to become better Rails developer, you can explore number of Open-Source apps out there written in Ruby on Rails, like:

https://github.com/diaspora/diaspora/

Have you managed to learn Ruby? If you are willing to start to work on some real-world apps, you could shoot us an email at https://kolosek.com/careers/.

References

Details
Ruby on Rails code quality