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.
Fixing mysql index deadlock issue in rails application
In this blog post I discussed one of the common MySQL index deadlock issues that had occured in our rails application. https://www.elitmus.com/blog/technology/debugging-and-fixing-mysql-deadlock-issue/
Import Spreadsheets in Ruby on Rails with Flatfile.com
The video and slides for the Montreal.rb July 2023 talk “Import Spreadsheets in Ruby on Rails with Flatfile.com” have been posted. [more inside]
devise-otp 0.6.0 is out!
I am releasing devise-otp 0.6.0 today. It features a fix for mandatory OTP setting, removal of the success message for better UX and you can now use it with older Rails 6.1 too. If you want to skip building up all these 2FA flows, consider getting Business Class for your next project.
A comparison of multiple generative AI tools when asking for Ruby on Rails code
I wrote a comparison of various AI generative code tools that I asked to transform a simple HTML code into a Rails helper.
Pattern Matching on Ruby Objects
I wrote https://fly.io/ruby-dispatch/pattern-matching-on-ruby-objects/ to show people how they can implement pattern matching in their Ruby objects that with with case ... in statements. Use it in your very own HTTP routers, Rack middleware, Rails apps, authorization objects (like Pundit), consume APIs, or parse files!
A new version of actual_db_schema
A new version of actual_db_schema gem has just been released https://github.com/widefix/actual_db_schema it contains a major fix that rolls back applied migrations in the reversed order. Big thanks Arkadiy Zabazhanov (https://github.com/pyromaniac) for contribution! #actual_db_schema
Bearer, a full-stack open source code security scanner for Rails application
Introducing Bearer, a comprehensive security scanner for your Rails application that offers an alternative to Brakeman. Bearer goes beyond just scanning your Ruby code; it also includes the ability to analyze your JS/TS code, making it an all-in-one solution. With Bearer, you also gain access to a distinctive set of rules designed to address privacy risks and prevent sensitive data exfiltration. [more inside]
Announcing minitest-snapshots 1.0.0
The minitest-snapshots gem has reached 1.0.0! It’s a simple minitest plugin for implementing Jest-style snapshot testing, so that you don’t have to manually maintain file fixtures for machine-generated data. Think of it as VCR, but for any value. [more inside]
Network Programming Basics in Ruby
Let’s look at the basics of Network Programming and open a socket https://lucas.dohmen.io/posts/2023/06/04/network-programming-basics-in-ruby
Procfile.dev, bin/dev, and Rails 7 — how they work, and why (I think) they're great.
Hey RubyFlow — I recently published an article which dives into the bin/dev script and Procfile.dev in Rails 7 projects. Read more — https://railsnotes.xyz/blog/procfile-bin-dev-rails7
Broadcasting Progress from Background Jobs
In a previous episode, we had created a custom ActionCable channel to assist in broadcasting updates from a background job. With the introduction of Turbo, we can simplify this process as we look at a few different approaches in displaying a progress bar with real time updates from background jobs. https://www.driftingruby.com/episodes/broadcasting-progress-from-background-jobs
Dragon Ruby Panel / Party! | Rubber Duck Dev Show 91
In this episode, we close out Dragon Ruby month with a panel / party of guests! https://www.rubberduckdevshow.com/episodes/91-dragon-ruby-panel-party/
Rails upgrade led to Ruby bug
This is a short story about a Ruby bug for an uncommon feature. [more inside]
Deploying Ruby on Rails with Dokku
Hey, I’ve just finished writing a massive guide about deploying Rails with Dokku. Check it out here - https://railsnotes.xyz/blog/deploying-ruby-on-rails-with-dokku-redis-sidekiq-arm-docker-hetzner
JSON.parse to OpenStruct
Describes a neat trick I found to directly symbolize the keys of JSON.parse and as a bonus, you could even tell it to return an OpenStruct instead of a Hash [more inside]
Solidus v4.1 is out!
We’re thrilled to announce the release of Solidus v4.1🚀 [more inside]
Hanami v2.1.0.beta1
Introducing hanami-view and sharing our plans for v2.1 https://hanamirb.org/blog/2023/06/29/hanami-210beta1/
A guide to setting up your next GitHub project
This is not Ruby-specific, but if you are creating a GitHub repo for your next Ruby project, you’ll want to review the following best practices: Improve your GitHub workflow with better repository defaults. Includes a quick introduction to some interesting low-level features of the gh CLI.
Keep Your Ruby App Secure with Bundler
By the end of the post, you will understand how bundler audit and bundler outdated work. Both can help you monitor the security state of your project’s dependency tree. [more inside]
Using Rails.env.local? in Rails
Explore using Rails.env.local? which returns true if the environment is development or test. [more inside]