Tutorials


Internationalize a medium Rails App with Vue frontend effectively with tooling
TLDR: I released a Ruby CLI tool that can semi-automatically extract raw Strings from Ruby-files, SLIM, ERB-Views and Vue-Pug templates. Read on about the background.Recently, we started to internationalize our ATS (Applicant tracking system) recr...




Rails 6.1 deprecates rails db:structure:dump and rails db:structure:load
Rails 6.1 deprecates rails db:structure:load and rails db:structure:dump tasks.Before Rails 6.1, executing rake db:schema:dump would dump db/schema.rb file. And executing rake db:structure:dump would dump db/structure.sql file.Rails provides confi...


Building a Ractor based logger that will work with non-Ractor compatible code
But we want to share a logger, right? Well, not exactly. What we want is to be able to use the same API to log pieces of information. And that’s the key point here.We can bypass all of our problems quickly. We just need a separate Ractor that will...

Solve race condition using database trigger function
As example, we have a Budget model, which have allocation_cents as the amount allocated for the budget, which can be used to buy the items proposed in the budget.A budget can have many_items, and we need make sure that the sum of the items' price ...

One-liner introduction - Ruby one-liners cookbook
I assume you are already familiar with use cases where command line is more productive compared to GUI. See also this series of articles titled Unix as IDE.A shell utility like bash provides built-in commands and scripting features to make it easi...