Ruby overview
Filed under Ruby, Ruby on Rails, Ruby Frameworks, Back-end Development, All Pages
Start here
Check out our guide to installing Ruby on your local computer.
Check out Team Treehouse’s list of Ruby projects. Ruby is written in C, and you can look at its source code on Github because it’s an open source language, which is how you’re able to learn it for free. Also, there’s a project to write a Ruby compiler in Ruby as part of a fun effort to write Ruby in Ruby (as opposed to C).
Definitely take a look at the Ruby core object model to get a sense for how it organizes itself.
Probably the best reason to learn Ruby is to be able to build things on/for the web and have a lot of fun while doing it. So check out Rails and other Ruby frameworks for building with Ruby on the web.
Essential resources
- Official Ruby documentation: a go-to place to find built-in Ruby methods.
- Ruby Weekly, a once–weekly e-mail round-up of Ruby news and articles, created and managed by Peter Cooper, author of Beginning Ruby book.
- Ruby was developed and is typically used on Unix-based operating systems like Mac or Linux computers. Are you on a Windows computer? Check out this article on some issues you might be encountering!
- Pry, an essential debugging tool
Concepts
- CSV with Ruby
- Understanding self in Ruby, one of the several of the most important Ruby concepts to learn.
- Hash#fetch vs Hash#key
- Singleton classes
- Include vs Extend for using modules
Ruby blocks
- Variables, constants, literals
- Blocks, Procs, lambdas
- Procs and lambdas and how to differentiate them
- More on understanding blocks, Procs, and lambdas
Cheatsheets
- Cheatsheet for Ruby Time and Date libraries
- Essential Ruby cheatsheet for methods defined on its built-in object types.
- Ruby core object model will help you see how the language built-ins are organized.
Ruby style guides
- Ruby style guide, one of the good ones
- AirBnB Ruby Style guide
Ruby and the web, without frameworks
- Net::HTTP Cheatsheet, best short-and-sweet support for making raw HTTP requests with Ruby, no framework required.
- HTTP Calls with Ruby
- Unirest, helping you make very clean http requests without the headache of Net::HTTP syntax.
- Building a Rack web server in Ruby
- RestClient, a simple gem for making HTTP requests, another alternative/wrapper to Ruby’s Net::HTTP
- Using Google’s Calendar API with Ruby wrappers
- Writing a microservice in plain Ruby
- Writing a simple Ruby web-crawler
Testing
- RSpec documentation, exhaustive and well-written
- Intro to test writing with RSpec
- Writing tests for remote URL calls
- Better Specs: a spectacular, thorough collection of rspec guidelines.
Refactoring
- Refactoring: Ruby Edition, by Jay Fields et al
- Clean Code: A Handbook of Agile Software Craftsmanship, by Robert C. Mrtin, a superb book and recommended.
- Refactoring, from good to great, a highly recommended talk from a conference
Regular Expressions with Ruby
- Rubular expression checker, your go-to for crafting regular expressions
- RegExp cheatsheet
- The Bastard’s Book of Regular Expressions, by Dan Nguyen, free online.
- RegExp crossword, a cool learning tool
- Interactive and excellent RegExp tutorial
- ‘You Don’t Know Anything About Regular Expressions’: A Complete Guide
- More RegExps in Ruby
- RegExps from the venerable Ruby User’s Gide
More resources
- Rails Casts, some of the most well-known Ruby/Rails casts, many come with really excellent notes if you don’t learn by listening.
- Awesome Ruby, big bunch of great resources.
- PracticingRuby
- Ruby Rogues podcast, a panel discussion about topics relating to programming, careers, community, and Ruby. They release a conversation with notable programmers and Rubyists each week.
- Ruby heap corruption
- Visualizing Ruby heaps
- Scraping with Ruby
- Mutability and freezing
- Ruby tricks you should be using
- ‘Inject is a Fundamental Building Block’