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.
Why I Don't Spend My Time Fixing Bugs Anymore
All I wanted, was to build an app. But what I found was even more amazing. [more inside]
25 reasons to switch to Webpacker
Is it worth the effort to migrate JavaScript compilation from the Rails asset pipeline to Webpacker? I think so. In this post, I take a look at the many benefits of making the switch: https://rossta.net/blog/reasons-to-switch-to-webpacker.html
Mistakes I've made treating file paths as strings
It bugs me about how long I’ve manipulated paths as strings without having a failure, but in the last couple of months things have broken in Ruby and Node projects. So I wrote about the issues I’ve faced and how we should approach path names to avoid them (TL;DR use the standard lib Pathname and File.join in Ruby).
How to fully automate renewing of Let’s Encrypt certificates for multiple sites
Let’s Encrypt has announced in the beginning of year, that it will no longer support ACMEv1 protocol for certificate renewal after June 1. 2020. At my work I run 4 Rails application instances with 12 web sites (domains) and have been using Let’s Encrypt certificates for years. They are automatically renewed every month. All I get is a mail indicating that certificates have been renewed. https://www.drgcms.org/blog/damjan-rems-526b8503835d1b13fb000002/how-to-fully-automate-renewing-of-lets-encrypt-certificates-for-multiple-sites-with-ruby-and-2020-03-04
Why Pry is one of the most important tools a junior Rubyist can learn
As programmers we often have to mentally run code. To imagine how a program will behave given certain inputs. This is hard enough for experienced developers. But for juniors? It can seem impossible. In this article, Melissa Williams argues that pry is an invaluable tool for junior rubyists because it allows them to see exactly what is going on as their code is run. https://www.honeybadger.io/blog/debugging-ruby-with-pry/
Building a Rails App With Multiple Subdomains
Learn how to build a Rails app that can support multiple subdomains. [more inside]
SpreadsheetArchitect v4.0.0 is now released!
Spreadsheet Architect v4.0.0 has now been released. Changes include switching to Caxlsx gem, Ruby 2.3+ required, and XLSX freeze support. Check the changelog for more details. https://github.com/westonganger/spreadsheet_architect
How to use horizontal sharding in Rails 6.1
I decided to take the new sharding PR for a spin, and I think you should too! <3 https://dev.to/schwad/how-to-use-horizontal-sharding-in-rails-6-1-4e4k
Optimizing full-text search with Postgres materialized view in Rails
In Ruby on Rails with pg_search gem tt is easy to search columns on associated models. Unfortunately, there is no simple solution to speed up those searches. This article shows how to optimize search with Postgres materialized view. [more inside]
Spree Commerce 4.1 with brand new Storefront UX released!
Spree 4.1 comes with a completely new mobile-first ultra-fast Storefront which you can easily customize to your brand or business requirements. [more inside]
Using Sane Defaults for Rails Apps Configuration
This post explains one of the practices we use to improve web service configuration management. As an example, we will use a Ruby on Rails application running on the Kubernetes environment. However, the general concept of sane defaults is technology-agnostic and entirely applicable to different programming languages and frameworks. - https://dev.to/amplifr/sane-defaults-25pe
Brutal 💎🔨
A code-first approach to automate the writing of unit tests, and practice Brutal-Driven Development.
The state of ruby blogs cont. - Top topics or ruby & rails versions in headlines
Hello, I’ve added a couple of more insights to the little survey about the state of the ruby feed-iverse that includes personal blogs, ruby project news and more. New questions incl. Q: What are the top topics / words in headlines? Q: What are the top ruby versions in headlines? Q: What are the top rails versions in headlines? Note: See the planet.ini for all feeds included in the survey. Cheers. Prost. PS: Greetings from Vienna, Austria - this is a Vienna.rb Meetup / Stammtisch project.
Handling Slow Cascading Deletes In Rails
We all inevitably face the compromise of handling cascading deletes in Rails. Do we do dependent destroys (which are ideal but slow) or just let the database handle the cleanup (but loose the lifecycle control)? Neither is idea, so we made a simple utility for how we’ve been doing those types of deletes that’s somewhere in the middle. We call it Miss Hannigan.
[Screencast] Syntax Highlighting with Action Text
Set up Action Text with client side Syntax Highlighting using Highlight.js. https://www.driftingruby.com/episodes/syntax-highlighting-with-action-text
A Secret Weapon for Your Rails Apps - RPC With RabbitMQ and Hutch
Communication between two or more applications is often everyday stuff, and it might seem that there is not too much to add there as this subject has been covered pretty well in the last years. Thanks to that, multiple patterns and standards have emerged. You no longer need to think about how the response format should look like for your REST API (go with JSONAPI and stick to the conventions) or figure out the authentication/authorization protocol (go with OAuth and the security headaches won’t bother you). [more inside]
Writing a Ruby Gem Specification
Writing a Ruby Gem Specification article dives deep into, often confusing, attributes of a Ruby gem manifest file. In doing so it demonstrates ways to make your gemspec simple and neat like Marie Kondo’s drawers. Enjoy!
fake_api now works in a simple standalone mode
https://github.com/igorkasyanchuk/fake_api#standalone-mode-1 added a new way to start fake_api in standalone mode. So no need to attach it to the existing app. It’s based on rack/rails so it could be deployed for example to the staging
Benchmarking Ruby 2.7's Numbered Parameters
Quick example of Ruby’s new numbered block parameters syntax and a benchmark against named parameters. [more inside]
Faster Excel Parsing in Ruby
Benchmarking popular gems for excel parsing, featuring a brand new gem optimized for the task. [more inside]