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.
EBNF 2.1.0 now supports ABNF and ISO/IEC 14977
Release 2.1.0 of the EBNF gem now parses W3C EBNF, ISO/IEC 14977 EBNF, and IETF ABNF grammars. This can be used to validate and format grammars expressed in these notations, perform limited transliterations between formats, and generate PEG/Packrat and LL(1) parsers. [more inside]
Using Action Mailbox in Rails 6 to Receive Mail
A “mostly real-life” tutorial on using ActionMailbox to receive and parse incoming mail. [more inside]
Two Factor Authentication using Devise gem in Rails 6 Application
Ruby on Rails application can allow users to login using a mobile number through the devise RubyGem. - https://www.botreetechnologies.com/blog/devise-gem-authentication-login-using-mobile-number-in-ruby-on-rails-app
Class instantiation behind the scene
In the Object-Oriented Programming (OOP) paradigm, a class is a blueprint when an object is the in-memory representation of this blueprint. https://www.rubycademy.com/screencasts/18
Pragmatic Rails Testing
I’ve been writing tests for Rails apps for over 5 years. I’ve come to a conclusion that well-written test suite makes developer more productive in the long term. The idea is to strike an optimal balance between not testing at all and writing zillions of tests. But where is this sweet spot? [more inside]
API-only ruby on rails course, building instapaper clone
I started to publish API-only ruby on rails course on duetcode.io. In this course, we will build a functional clone of Instapaper from scratch. The course targets the developers already familiar with rails tech stack and it also has a written format. It’s an ongoing course, and I’m planning to share new chapters weekly basis, today I posted the fourth chapter of the course. Let me know if you have any feedback about the course or the website in general.
🛍 Keep up with the Solidus community by reading "Roadmap Update"✨
🛣 “Roadmap Update” is a wonderfully written newsletter that will provide you with monthly updates on Solidus and its wide ecosystem. [more inside]
Redis in Ruby, An online book about building your own Redis
Redis in Ruby is a work in progress online book (3 chapters currently available) about building your own Redis, in Ruby, and learn a bunch of things along the way, tcp, sockets, syscalls, threads, processes, hashing algorithms we’ll touch on these and more. [more inside]
Scaling Queue Workers Efficiently with AppSignal Metrics
Let’s use some simple math and performance data to find our optimal worker count, based on the work waiting in the queue. [more inside]
Using AWS with Ruby in 2007
This one is a bit of a treat. Normally I capture blog posts, articles, releases or talks. But this week I’ve found an AWS-with-Ruby tutorial archived from the AWS site this week in 2007! http://www.pastrubies.com
Ruby on Rails vs Python: What’s The Difference?
Ruby on Rails development or Python, what sets them apart from each other? Knowing the difference can make a difference in your programming. While both have their strengths, a careful analysis can help you select the one most appropriate for your development needs. https://www.botreetechnologies.com/blog/ruby-on-rails-vs-python
End-to-End Encryption in Rails with Stimulus and OpenPGP.js
Ever wondered how to implement end-to-end encryption in a server-side-rendered app? In this post, I explain how we did it in a production app and give an example for a user-to-user messaging system that encrypts and decrypts messages on the client via Stimulus and OpenPGP.
Rails and JavaScript, parts 2 and 3
My series of posts on the history of Rails and JavaScript continues with part 2 covering CoffeeScript, Sprockets and Turbolinks and part 3 covering Webpacker and Stimulus.
Pagination and Scroll Restoration with Turbolinks
Two weeks ago, it was all the rage to point to missing HEY features as slam-dunk arguments for your-SPA-framework-of-choice. One of those was restoring your place in your imbox after opening an email. Here’s a look at how we might do it.
Anonymous Struct Literals Might Be Coming To Ruby
There’s a neat proposal to add anonymous Struct literals to Ruby! I wrote an article summarizing the proposal and why it’s great. Check it out here!
A Safer RuboCop, Part Deux
A wrote a short article on our recent efforts to improve auto-correct in RuboCop.
Soft Delete with Discard
Soft delete is a way where users can mark a record as no longer needed, but the data is retained. https://www.driftingruby.com/episodes/soft-delete-with-discard
How to Install Mariadb on Ubuntu and Connect Ruby on Rails?
Learn more about how to install mariadb on Ubuntu and connect ruby on rails? https://www.botreetechnologies.com/blog/how-to-install-mariadb-on-ubuntu-14-04-lts-and-connect-ruby-on-rails
rubocop-graphql
rubocop-graphql is a rubocop plugin that enforces graphql-ruby best practices
[ActiveRecord] Easily build and chain Common Table Expressions queries
Following on my 6 months old PR to bring CTE support to Rails out of the box I released the code as a Ruby gem https://github.com/vlado/activerecord-cte.
It uses Arel in the background and is database agnostic. Always returns ActiveRecord::Relation
so it is easy to chain, cache, count, aggregate, …
has_placeholder_image for ActiveStorage models
We’ve released a Ruby gem enabling developers to generate string based placeholder images for Ruby on Rails models with ActiveStorage. Check it out: [more inside]
Ruby Mysql2 Lambda Gem
Very simple Mysql2 gem precompiled for Amazon Linux 1 & 2 (Ruby 2.5 & 2.7) with statically linked libmysqlclient ready for any AWS Lambda usage, including Rails. https://github.com/customink/mysql2-lambda