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.
Unofficial guide to Tailwind and ActionText for Rails 6
I recently wrote an article on how to install ActionText using the latest Rails 6, also it guides you through the workarounds of using it with Tailwind. [more inside]
Where Do Ruby Blocks Come From?
It’s time to get reflective…time for some deep introspection…so light a candle or two, put some Barry White on the stereo, get nice and comfortable, because we’re going to talk about Blocks. Blocks in Ruby are powerful, and they’re used everywhere. But we’re not here to talk about how to write blocks per se or what they’re good for. We’re here to talk about where they come from.
Fun with Ruby method argument defaults
A quick overview of simple but powerful (if weird) techniques of (ab)using Ruby method argument defaults, like def read_data(file: raise(ArgumentError, '#read_data requires path to .txt'))
Ruby Gems CI using GitHub Action
Short blog post after doing a few migrations… [more inside]
Adding Authentication in Rails 6 with Rodauth
Tutorial on adding authentication to a Rails 6 app using the Rodauth authentication framework: https://janko.io/adding-authentication-in-rails-with-rodauth/
RailsBump
Hello folks, I’m happy to present RailsBump, which I have been working on for a while! RailsBump is useful to anyone looking to upgrade the Rails version of their app. It shows you whether your favorite gem (or all gems in your Gemfile) is compatible with the next Rails release. Check it out and let me know what you think: https://railsbump.org/ If you have ideas for more features or run into problems, please open a Github issue: https://github.com/manuelmeurer/railsbump
Generating PDFs In Rails Application Using DocRaptor
I wrote about how to generate PDFs using DocRaptor.com in Rails 6 at
My Beef With RuboCop
My aim here is to disabuse readers of the notion that RuboCop can only make code better. It’s a tool, and whether it helps or hurts depends on how it’s used. Don’t be afraid to disable cops if you can’t see how they benefit the team.
Ruby Refinements Have a Second Good Use Case
After conversion wrappers a second good use case has been discovered in the development of a configurable logger for StimulusReflex: Refinement of String in our Gem to provide a nicer API to color your output without polluting the class for the whole application:
Exploring Merge Sort With Ruby
You’ll probably never implement sorting from scratch. But sorting algorithms are foundational in computer science and have become a standard feature of the ritual hazing…er…interview process for developers at all levels. In this article, Julie Kent introduces us to the merge sort algorithm. She’ll show us how it works, implement it in ruby, and discuss its performance characteristics. [more inside]
Overriding private methods of superclass in Ruby
What happens when a private method of superclass is overridden in Ruby?
acts_as_tenant v0.5.0 released by excid3
Multi-tenancy is Rails is very common but we didn’t have an actively maintained gem. Chris Oliver just become the maintainer of Acts_As_Tenant and published a release
Rails Model Patterns and Anti-patterns
If you’re struggling with models, this blog post is for you. We will quickly go through the process of putting your models on a diet and finish strongly with some things to avoid when writing migrations. [more inside]
"Patches Welcome!"
I gave a talk at LRUG last week, called “Patches Welcome!”, about why I do open source software development. I’ve posted a video and a transcript of the talk on the ShinyCMS blog.
benchmarking JSON Parsers (OJ vs SimdJSON)
Either library is around 2x faster than StdLib, and OJ is mostly a drop-in replacement, depending on your needs SimdJSON can over another 20-30% improvement. See the JSON parsing benchmark results and details.
How To Create Custom Shopify App With Rails?
Creating an application for shopify using Ruby on Rails is very easy. Learn More about How To Create Custom Shopify App With Rails. Contact Us Now!
mruby3.0 introductory Webinar
Hello, Have you heard about Matz’s new language, mruby? mruby was released to the public in 2012 and will be updated to version 3.0 this winter. mruby can be used for a variety of applications from enterprise embedded development, game development, and web server add-on function development to fun personal projects using microcontrollers. In this webinar, Matz himself will talk about the new mruby and answer your questions, so we encourage you to join us. We look forward to having you in the webinar!
Hacktoberfest Recap: Open source Ruby/Rails work in 2020
There are a bunch of ways to contribute to open source in the Rails ecosystem that don’t involve the main rails/rails repo. Here’s how I got my Hacktoberfest shirt this year by contributing to Ruby and Rails projects:
Data pipelines in Ruby on Rails
If you need to bring a lot of data into your app, a data pipeline can help. This article describes how to build a simple data pipeline with Ruby on Rails, Sidekiq, Redis, and Postgres. [more inside]
New components in Stimulus-components with first class support for Rails
Since the last time I’ve talked about stimulus-components, I added lot of new controllers! [more inside]
football-cat gem - concatenate football.csv datafiles - make out of many, one
Hello, I have put together the new little football-cat gem / tool that lets you concatenate match files (for football clubs or national teams) in the one-line, one-match & one-file, one-season Football.CSV format into one PLUS (auto-)adding the missing league and season headers / columns inferred from the file’s basename (e.g. es.1.csv => ES1) and the file’s directory (e.g. /2020-21/ => 2020/21), for example. Happy data wrangling with ruby. Enjoy the beautiful game. Cheers. Prost.