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.
Anonfiles.rb
up & download images to anonfiles - the free anonymous (duh) filehoster
Blocks in ActiveRecord's where, a small post
ActiveRecord has limited power when it comes to complex queries, this is a proposal to improve the way we query for data
Defining gem dependencies in single file Ruby scripts
Bundler has an inline gemfile definition feature that lets you define gem dependencies in a single-file Ruby script. Read on to see how: [more inside]
Building a Toy Lexer in Ruby
Lexers are magical. They take your messy, hand-typed, human text, and convert it into a clean data structure that the computer can process. Every time you run a ruby program, use structured search or type in a date by hand, you’ll find a lexer hard at work. In this article, Alex Braha Stoll pulls back the curtain to show us how lexers work and how to implement one for a simple programming language.
Modifying Ruby's StdLib with Gems
How to safely patch Ruby’s StdLib in Gems, how to avoid issues of combined Module#prepend & method aliasing, from other patches.
Traffic problems: Software vs. Daily life
Interesting similarities in impacts and solutions
Custom directory for Webpacker in Rails apps
It is possible to use custom directory for #Webpacker code instead of the default app/javascript 🤟🏻 [more inside]
Introducing Deimos: Using Kafka as the Data Backbone for your Architecture
This link is a bit old now, but honestly I didn’t originally know where to post it so people would see. :) Deimos has been heavily used at Flipp for enabling a number of Kafka-powered microservices and we’ve continually been adding features to it (including better batch processing, pluggable schema adapters and a poller feature similar to Kafka Connect). [more inside]
Sharing Code with Ruby and Rails
Ruby and Rails provide many ways to share code between objects. If you’re new to Ruby or Rails, or don’t work in them often, it can be hard to remember what each one does. Despite this, each of these tools serves a different purpose in a Ruby system’s architecture; understanding when to choose one over another can make your code more readable and maintainable. [more inside]
System of a test: Proper browser testing in Ruby on Rails
An ultimate Ruby on Rails browser testing setup for 2020. Vladimir Dementyev from Evil Martians, author of AnyCable, TestProf, and Action Policy, distills years of testing experience into this easy-to-adopt practical guide.
Rails 6.1 adds support for where with a comparison operator
How to control the enqueuing speed of Sidekiq jobs and their concurrency
How to control the enqueuing speed of Sidekiq jobs and their concurrency using Redis and BLPOP
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. -
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.
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]
Joining array elements without using Array#join
rubycademy.com/joining-array-elements-without-array-join
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.
How to Use Sidekiq in Rails 6
A deep dive into the Rails engineer’s favourite background-processing system [more inside]
🛍 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]