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.
Debugging ActiveRecord connection pools
A few weeks ago I ran into a Rails bug that caused our database pool setting to be ignored (fixed in Rails 6). In this video I step through the debugging process I used to find the cause.
Why Do We Need Application Servers in Ruby?
We all use Puma, Unicorn, or a similiar application server for our web applications. But do you understand WHY we use them? Why doesn’t Rails just do everything? Why can’t we use Nginx or Apache? Everything explained in this new article: https://www.rubyguides.com/2019/08/puma-app-server/
Gradient Boosting algorithms with Ruby
Courtesy of @ankane we’ve got two new binding libraries for Machine Learning in Ruby: lightgbm and xgb. [more inside]
Multiprocessing in Ruby - a Good Alternative to Threads?
Parallel computing is a cure for performance issues. It allows to do several things at once, which sounds great in the context of background jobs. Inspired by Python’s multiprocessing module I began to think about the parallelism in Ruby. Of course, there are several ways to get closer, but in this post I’ll try to focus on the Process module. [more inside]
Rails 6 adds support of symbol keys with ActiveSupport::HashWithIndifferentAccess#ass
Load Rails Partials on Demand with New Toggle Feature in render_async 2.1.1
render_async allows you to load partials by reacting with a specific HTML element. [more inside]
Create RSpec tests automatically from a Swagger
Create RSpec tests automatically from a Requests file. Perfect to be used with the result from importing a Swagger file using the open_api_import gem. https://github.com/MarioRuiz/create_tests
'Repost' gem now supports Authenticity Token
Gem allows to make ‘redirect’ with method [post]. [more inside]
Attribute change diffs in large trees of associations
Ever needed to diff a big object tree or compare an attribute from a deleted association? How about feeling like you’ve outgrown ActiveModel::Dirty? Maybe my gem could help you. [more inside]
footballdb-clubs Gem - Match 1500+ Football Club Names from 100+ Leagues
Hello, I’ve put together the footballdb-clubs gem / library
that bundles-up an all-in-one football.db /clubs datafile
and lets you match 1500+ football club names from around the world
“out-of-the-gem / box “ with zero-configuration. It’s as easy as require 'footballdb/clubs'; Club.match('Bayern'). Enjoy the beautiful game. Cheers. Prost. PS: Trivia Quiz: What club will Club.match( 'AZ' ) match?
Durable Sidekiq Jobs: How to Maximize Reliability of Sidekiq and Redis
Sidekiq is one of the most popular (if not the most popular one) background job framework in Ruby world, which is not a big surprise: it allows to achieve a decent throughput, is stable and well-maintained, has some great features (including also all the gems extending its built-in functionality) and is easy to get started with. It seems like you could simply install Redis, add Sidekiq to your application and you are good to go! [more inside]
Rails gem for API authentication using JWT
I am excited to share the gem named API Guard that I have built for authenticating the APIs built on Rails using JWT. https://github.com/Gokul595/api_guard Feedback and contributions are welcome.
On maintaining my static website generator webgen
My static website generator webgen has been around for a long time. Though there are now many other static website generators written in Ruby I still maintain webgen because some of its functionality is unique.
Decorating Ruby - Part One - Symbol Method Decoration
First part out for how to decorate methods in Ruby, redefining methods by name and using prefix methods.
ExceptionNotification v4.4.0 is out 🚀
Including support for Rails 6.0 among other things https://rubygems.org/gems/exception_notification/versions/4.4.0
Maintainable Rails: A Newsletter
Are you in need of a healthier, more stable and secure Rails application? The Maintainable Rails email newsletter will give you weekly tips and tricks for a better Rails app. [more inside]