The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Identifying randomly failing tests with RSpec bisect
When you have tests that sometimes pass but also sometimes fail, it’s often because one of your supposedly independent tests isn’t tearing down properly. Manual debugging could take hours – but rspec --bisect can help narrow down the cause really quickly. https://medium.com/@scottm/find-the-cause-of-randomly-failing-tests-with-rspec-bisect-dfe9ee2a70c2
Understanding Boolean Operator Precedence in Ruby (&&, and, ||, or)
Operator precedence might be one of the most confusing parts of the Ruby language. Even the docs recommend you just use && and ||. Read it here
Monitoring Rails applications with Datadog
This guide walks you through how to use Datadog to collect metrics, request traces, and logs from a Rails application running on Passenger, Apache, and MySQL.
Rails Authentication Routing Constraints Considered Harmful
This post is from the considered harmful series where we talk about wrong way of doing things.
Writing Testable API Documentation Using APIB and Dredd
In this tutorial, we will use the DDD (documentation-driven development) approach to writing a kind-of-mocked Rails API application. We will set up extensive documentation testing using a combination of Rails API (our framework of choice), API Blueprint (as a language describing our API endpoints) and Dredd (a tool to test API endpoints against documentation). Read it here
How To Learn Ruby
I first stumbled upon Ruby in 2007. All I wanted back then, was a language that I can build something cool with. I was going from knowing nothing to knowing something, so the information had to be as jargon-free as possible Read it here
How to Write a Case Expression in Ruby
Ruby uses the case for writing switch statements. Learn how case works and how you can use it. Read it here
dry-rb: dry-monads 1.0 released
Release announcement for the first dry-rb gem to make 1.0.
Ruby’s Powerful Method Arguments & How To Use Them Correctly
In this article you’ll learn about the variety of method arguments in Ruby, which ones to use & why, and you will learn about the rare “catch-all” argument type! https://www.rubyguides.com/2018/06/rubys-method-arguments/
Sidekiq-ifying Emails at Reflektive
A post about how we improved email delivery and monitoring with Sidekiq at Reflektive [more inside]
How to Create Search Form with Ransack
Ransack gem allows to create simple and advanced search forms for Ruby on Rails apps. This article explains how to use it.
Quest for Ruby Pattern Matching
An invitation to discuss possible pattern matching (or its elements) in future Ruby versions, and what could be introduced with minimal and reasonable changes to the language.
Ruby's attr_accessor, attr_reader and attr_writer
A Ruby object has its methods public by default, but its data is private. So if you need to access the data, for either reading or writing, you need to make it public somehow. Read it here
Docker for Rails Development
Docker for Rails Development is a step-by-step guide on how to use Docker to standardise a common development environment across a diverse team.
Frankenstein's ActiveRecord
Frankenstein’s ActiveRecord: How to stitch together complex ActiveRecord queries from simple parts has some great tips and techniques for working with your database using ActiveRecord. It includes some less well-knows Postgres features for grouping and manipulating data.
Accessibility on Rails
Accessibility on Rails outlines the specific A11y tips that you can add to your Ruby on Rails project to make it suitable for a large and diverse audience.
Five small hacks for your Ruby projects
Five small hacks for your Ruby projects are the top five tips and techniques built over a 13-year career.
Managing stripe for subscription payments in Rails
Managing stripe for subscription payments in Rails complete with code examples.
Announcing Rutie — The Tie Between Ruby and Rust
Rutie is a fork/offshoot from the ruru and ruby-sys projects. This project allows you to integrate Ruby into Rust and vice versa. This project’s values consist of:
Passenger 5.3.3: installer fixes
Version 5.3.3 of the Passenger application server for Ruby, Node.js, Meteor and Python has been released. This release contains fixes for a bug in the installer scripts for the Nginx and Apache modules: https://blog.phusion.nl/2018/06/26/passenger-5-3-3-installer-fixes/
Rails 5.2 uses AES-256-GCM authenticated encryption as default cipher for encrypting
RubyKaigi 2018 Review – conference in a nutshell
RubyKaigi 2018 has ended, but the excitement is still fresh. Here’s my extensive review of the authoritative international conference on the Ruby programming language, its talks and the parties that happened there.
Is Ruby pass-by-reference or pass-by-value?
As you learn your way through Ruby’s OOP, you will eventually stumble upon the concept of object passing. It might not be very clear if Ruby uses pass-by-reference or pass-by-value to send objects to a method. Read about it here
Object-Oriented Programming (OOP) with Ruby
Learn about Object-Oriented Programming (OOP) with Ruby, and become a better Ruby developer. Read it here.