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.
Rails 6 + React JS Application setup with simple CRUD operation
Setting up Rails application with ReactJS usually takes some time. Setting up React Router and Redux for Front-end is an essential part of using React with Ruby on Rails. [more inside]
A beginners' introduction to Ruby classes and objects
When you start learning Ruby, you often hear that everything is - or evaluates as - an object. Here’s an introduction for junior developers who want to get the gist of objects and classes in Ruby. 👉 A beginners’ introduction to Ruby classes and objects
MissileEmitter: A littile fun tool for metaprogramming
Hi, I made my first ruby gem: MissileEmitter, It can help you define configurable DSL at the class level, enjoy it :)
Working with Capistrano: Tasks, Roles, and Variables
The Working with Capistrnao: Tasks, Roles, and Variables is a first article in a series where my goal is to provide core concepts and explore more advanced features of Capistrano whilst writing solutions to common problems maintaining web applications in Ruby. Enjoy!
Active Storage: permanent URLs w/o redirects, using Digital Ocean behind Cloudflare
A short post on how to use Active Storage with Digital Ocean fronted by Cloudflare (to save money on bandwidth), and how to load attachments directly from the CDN without requests going through the app first, and then being redirected to the CDN. [more inside]
'Redirect' using POST in Rails. Full story
Full story of the gem ‘repost’ creation -
Unlearn programming to learn Ruby
Why is the Ruby philosophy the exact opposite of other programming languages? SEE MORE
Rails_DB - new version released
If you need online access to DB in your application (could be useful for QA, bug investigation or cases when you don’t have access to DB by port) you can use this gem: . The new version has few fixes, improvements and dependencies upgrades.
ActiveRecord Migration: terminology
Why do we refer to database updates as migrations in ActiveRecord? SEE MORE
Testing Active Job with Rails
Writing tests for background jobs is a lot easier than you might think using Rails’ built-in helpers. You can use them to verify jobs were enqueued with the right arguments and you can also use them to run the jobs inline. Watch the screencast to learn how to test ActiveJob
Solving Puzzles with Amb
Ever since an article about fibers, I was curious about an amb operator. Recently, I’ve solved a few classical problems using amb. The result turned out to be short, simple and declarative. Check it out
Unit testing rack middleware
Underneath (almost) all Ruby web application lies the Rack architecture. With minimal interface, it is simple to write a middleware. Let’s see how to test it: https://tejasbubane.github.io/posts/2019-11-12-unit-testing-rack-middleware/
Storing commands in Rails Event Store: unexpected benefits
Rails Event Store, like the name suggests, is meant to store events. Commands are a different concept, but they’re very similar in structure. In one of our projects we slightly abused RES and made it store commands alongside with events. This helped us reproduce and fix complex defects. Read on. [more inside]
ActiveStorage Resumable
A blog post describing the suffering of a full-stack developer and also preseting ActiveStorage Resumable, an ActiveStorage extension that supports resumable uploads for Google Cloud Storage.
strings-case release v0.1.0
The strings-case gem aims to help you transform any string into most popular cases, be it camelCase, snake_case, kebab-case, Title-case and more. It allows you to preserve acronyms and use a custom separator in case you need to change the default one.
Is it time to replace Rake?
We Ruby developers use Rake and Rakefiles for many of our build, test, and deployment scripts. Yet Rake has always felt a bit clumsy, and that shouldn’t be a surprise. It was actually not designed for most of what we use it for. Would a different tool work better? [more inside]
date-formats library / gem - read / parse dates (and times) from around the world
Hello, I’ve put together a date-formats library / gem that lets you read / parse date (and times) from around the world. Let’s try a French date e.g. DateFormats.parse( 'Lundi 1 Janvier', lang: 'fr') or a Spanish date e.g. DateFormats.parse( '1 Ene', lang: 'es' ) and so on. Happy date wrangling with ruby. Cheers. Prost. PS: Yes, you can add new (and more) formats using regular expressions / text patterns.
ClickHouse Ruby driver
https://github.com/shlima/click_house A modern Ruby database driver for ClickHouse, was inspired by currently unmaintainable alternative but rewritten and well tested. [more inside]
Clerq: requirements management, format, repository, CLI
Most of my work time I work with software requirements, and other items based on requirements, like estimations sheets. I write bulk documents and don’t like the behavior of big word processors (MS Word, LibraWriter, etc.) on bulk documents. I created a gem clerq that provides the ability to write big documents in small separate files using Markdown. More information you can get from README