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.
hubba gem - little github api helper for (auto-)generating statistics reports
Hello, I have updated the hubba gem - a little github api helper for (auto-)generating statistics reports (summary, stars, timeline, updates). Cheers. Prost.
Productivity Tools that every web developer should aware of
Do you want to increase your productivity? My article on “Productivity Tools that every web developer should aware of” can help you. Read it here:
Adam Wathan joins Remote Ruby to discuss all things Tailwind CSS
Listen here or on your podcast player of choice! [more inside]
What makes Ruby on Rails the best Web Development Framework
Ruby on Rails web development framework is still going strong. Read this blog to know what makes Ruby on Rails for web development so relevant for businesses in 2020.
Polyphony has a new io_uring backend!
I am pleased to announce the release of Polyphony version 0.46.0, which includes a full-blown io_uring backend. The io_uring backend uses a relatively recent new I/O API in Linux that is the future of I/O processing. The new backend provides more than double the performance of the libev backend, achieving over 120K requests/second using a basic “Hello world” HTTP server. [more inside]
How's the Performance of Ruby 3.0.0-preview1?
How does the new preview’s performance stack up on Rails? And how reliable are these numbers? [more inside]
Some things you should know about eager loading in ActiveRecord
Discover an automated way of dealing with N+1 queries, how to go around some of the limitations of eager loading in ActiveRecord and how to write tests to prevent those sneaky N+1 queries from coming back:
Scoped Associations in Rails
I’ve never thought that ActiveRecord associations could be used as scopes until last week. I couldn’t find a step-by-step explanation, so I did a quick write up about how one can scope associations in Rails. [more inside]
Test-Commit-Revert: A Useful Workflow for Testing Legacy Code in Ruby
When you inherit a legacy app with no tests, your first step should be to add them. But that can be a huge task! How do you even start? In this article, José will introduce us to a testing workflow called test-commit-revert (TCR) that is particularly useful for adding tests to legacy systems. He’ll show us practical examples and help us set up our tooling for minimal friction.
Testing Tables in ActionText Using System Test
So you’ve built a fascinating, interactive addition to your ActionText page. How do you test that interactivity? You can use System Test, a feature built into Rails to run apps and test them in a web browser. This tutorial explains how you can test you Stimulus.js controllers:
HTTPX: curiosities of the multipart plugin
How using my own library in my day job helped me identify some unusual behaviours, and what was learned in the process. [more inside]
How I decreased the carbon footprint of my CI suite
The story of how an unconventional ruby library test suite has been optimized, and lessons learned. [more inside]
Rails 6 and Stimulus.js - a quick and painless launch
Do you want to play with HTML and make your Rails app interactive but you are not interested in using React or Vue? Try out Stimulus.js from Basecamp!
Why You Should Migrate your Heroku Postgres Database to AWS RDS
Heroku PostgreSQL addon is excellent for a quick start setup of a new project. Once your web app matures, then migrating to a more customizable database engine like Amazon RDS should be considered. [more inside]
Setup your server with Alpine Linux in diskless mode
I have been used to have a server running under my desk for years now. It serves “Nextcloud” for internal data sharing and “GitLab CE” for hosting my internal “git” repositories. This article () describes my search to get a new one up and running with “Alpine Linux” in “diskless mode”.
[Screencast] Benchmark Ruby Code
It’s easy to accidentally write slow code in our applications. In this episode, we look at how we can benchmark our code and examples of some methods which are slower than others. https://www.driftingruby.com/episodes/benchmark-ruby-code
Dockerizing a Ruby on Rails app with a PostgreSQL Database
These are the configurations I use to deploy a dockerized Rails 6 app. Note that this is a small hobby app so I’m using docker-compose to deploy it, for more serious apps you’d want to use docker swarm or kubernetes.
Full page caching in Rails with a memcached cluster and middleware
A little while ago I wrote a post on how to implement full page caching for a Rails app using Nginx and Redis; I have since replaced the single Redis instance with a memcached cluster and a middleware instead of Nginx to improve scalability and simplify things by removing some dependencies. Post:
Rebuilding Redis in Ruby - New Chapters
Rebuilding Redis in Ruby is a free online book, where we rebuild Redis, in Ruby, from scratch. [more inside]
Glimmer DSL for SWT 4.17.2.1 Hello, Custom Widget/Shell!
Glimmer DSL for SWT 4.17.2.1 (JRuby Desktop Development GUI Library) has been released:
Installing Ruby with ruby-build and ruby-install
Find out about the differences between ruby-build and ruby-install. Which one should you install for development and which one for production?
PostGIS vs. Geocoder in Rails
This article compares PostGIS in Rails with Geocoder and highlights areas where you’ll want to (or need to) reach for one over the other: PostGIS vs. Geocoder in Rails
Rails Application performance impovement
Are you concerned about your Rails Application performance? My new article may help you. Read it here:
Joining polymorphic associations in ActiveRecord
Short list of thoughts on how to join polymorphic associations in ActiveRecord and why it cannot be loaded eagerly