When deploying a Rails application that is using Webpacker and Capistrano, there are a few configuration tweaks that optimize the...
IRB 1.2 (shipped with Ruby 2.7, but works on 2.5+) brings pretty syntax highlighting and multiline cursor navigation. However, pasting...
Git diffs show the surrounding contexts for diff hunks. It does so by applying regular expressions to find the beginning...
If you have installed Rubocop in your project, RubyMine can show you Rubocop violations immediately in your editor. You probably...
curl-to-ruby is a handy tool that converts your curl command to ruby code that uses the Net::HTTP...
In Rubocop you might notice the cop Style/CaseEquality for e.g. this example: def foo(expected, actual) expected === actual end
Here is a short summary of Cucumber hooks in Ruby taken from https://github.com/cucumber/cucumber-ruby. Note that the BeforeStep is...
We currently test most of our gems on Travis CI, but want to migrate those tests to Github Actions. This...
On some of our older projects, we use the mysql2 gem. Unfortunately, versions 0.2.x (required for Rails 2.3) and...
Installing old Rubies (<= 2.3) with a standard rbenv + ruby-build is no longer possible on Ubuntu 20.04. This is because...
The sidekiq-rate-limiter gem allows rate-limiting Sidekiq jobs and works like a charm. However, it needs to be...
If you're using the webdrivers gem and VCR together, depending on your configuration, VCR will yell at you regulary...
Pagy is a gem for pagination. They make some bold claims: Pagy is the ultimate pagination gem that outperforms the...
If you want to get the path of a file relative to another, you can use the expand_path method...
To find a version containing the regular expression foo in the history of any branch: git grep foo $(git rev...
Ruby Jard provides a rich Terminal UI that visualizes everything your need, navigates your program with pleasure, stops at matter...
This is an extract from the linked article. It shows an approach on how to implement encrypted passwords with the...
Rails 5.2+ supports "verbose query logs" where it shows the source of a query in the application log.
Important If your railscomplete-deployment uses the net-ssh-gem please ensure you use version 5.2.0 or newer to ensure...
When you use Sentry to monitor exceptions, an important feature is Sentry's error grouping mechanism. It will aggregate similar...
In Ruby on Rails, all the routes of a given application can be found within the config/routes.rb file.
When writing some logs to a file, that don't use Ruby's logger utility, it is often useful to...
If you have a Ruby Pathname, you can use the method :/ to append filepaths to it. With this method, Ruby...
Ruby's File class has a handy method binary? which checks whether a file is a binary file. This method...