PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or...

Given there is a user with an attachable avatar: class User < ApplicationRecord has_one_attached :avatar end

The key to unlocking the full potential of LLMs in coding lies in crafting precise prompts. The main challenge is...

Bundler allows you to specify the name of the Gemfile you want to bundle with the BUNDLE_GEMFILE environment variable...

makandra dev
impactahead.com

Also see the list of IRB commands. Switching the context Changes the "default receiver" of expressions. Can be used to...

When Ruby objects are inspected in any modern IRB, some objects (like ActiveRecord instances) are rendered with neat colors and...

makandra dev

Capistrano 3 has a doctor task that will print information about Environment: Ruby, Rubygems and Bundler versions List of Capistrano...

makandra dev

YJIT is Ruby's default just-in-time compiler. It is considered production-ready since Ruby 3.2 (source).

Git has the concept of hooks: bash scripts that are invoked at certain points in the Git lifecycle. One handy...

github.com

When handling nested hashes the RSpec output is often hard to read. Here the gem super_diff could help.

Rails' default logger prefixes each log entry with timestamp and tags (like request ID). For multi-line entries, only the...

Sometimes we have to write code that behaves differently based on the version of a specific gem or the Ruby...

makandra dev

While most Rails Apps are tied to at least one external REST API, machine-to-machine communication via GraphQL is...

When Rails releases a new version of their gems, they also release a number of npm packages like @rails/activestorage or...

Some rubygems come in platform-specific versions (i.e. "x86_64-linux") in addition to the usual "ruby" platform. This is...

Running gem update --system will install the latest version of RubyGems. However the latest version might not be compatible with...

This cards describes an example with a Github Client on how to keep your Rails application more maintainable by extracting...

After an upgrade to rails 7 I noticed that async reindexing jobs of Searchkick were failing for Model.reindex(mode: :async...

If you are using the routing-filter gem in your Rails 7.1 app for managing URL segments for locales or...

When making requests using the http gem you might want to automatically follow redirects to get the desired response. This...

Debugging performance issues in your Rails app can be a tough challenge. To get more detailed insights consider using the...

If you need to make an HTTPS connection to a host which uses an expired certificate, do not disable certificate...

It's 2024 and we have tools like ffmpeg, imagemagick and GPT readily available. With them, it's easy to...

You can chain multiple Capybara matchers on the page or any element: expect(page) .to have_content('Example Course')