...fail with an SQL error due to duplicate index key. You can change Rails' behaviour, by saying class User < ActiveRecord::Base validates_uniqueness_of :name, case_sensitive: false end

...set :bundle_without, %w{development test cucumber deploy}.join(' ') Be aware, that gems that belong to two groups, are only excluded, when both of the groups are excluded, e.g. to...

makandra dev

...sends out transactional e-mails to a large number of users, e-mail deliverability becomes an issue. E-mail providers work hard to eliminate spam and have put in place...

...No staging sandbox No permission system for api keys No authentication mechanism for webhooks besides IP ranges Buggy admin UI SendGrid Pro: Very good deliverability Not quite as expensive

Ubuntu 24 added some guarding for Python packages which no longer allows installing applications through pip on system level. Instead...

...default: 3.0.1) It is still possible to have newer version of a gem installed beside the default version: gem install strscan Fetching strscan-3.0.3.gem Building native extensions. This could take a...

...will happen and will have effect. But what we can observe is that the behaviour of the callback function :my_method does not happen in the test, as if the...

...i.e. one transaction can see most of what another is doing), and SERIALIZABLE the best (i.e. transactions are very well isolated). Conversely, READ UNCOMMITTED gives you the best performance, while...

...will be the slowest, due to a lot of locking. This also affects locking behaviour and replication performance. The default level is REPEATABLE READ, and it's the mode you...

Due to network or hardware failures, it can happen that one of your cronjobs will not run at the time...

If you're using a Redis cache in Rails (e.g. :redis_cache_store), it's possible to configure additional parameters...

The recommended additional setup of the spreewald gem, a useful set of cucumber steps, includes adding a file for defining...

Since Rails 7 you are able to encrypt database information with Active Record. Using Active Record Encryption will store an...

github.com

...multiple subsequent occurrences of a given character with a single one Use Tap For Better Test Data Setup let(:order) do create(:order, name: "My Order").tap do |order|

w3c.github.io

Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example...

...rough setting (e.g. open Photos with Shotwell Viewer). If a certain file type (or better mime type) should be opened with a different application, this can be set via command...

For searching in large database tables we usually use PostgreSQL's fulltext search capabilities. While this works reasonably well for...

Newer versions of Bundler (at least since 2.3) have two different behaviors: If your Gemfile.lock reads PLATFORMS: ruby, it might either install a compatible platform-specific version...

...or similar), bundler will install exactly the versions indiciated in the Gemfile.lock. Fix For better consistency, I would advise to make sure you always have PLATFORMS x86_64-linux

makandra dev

...make block elements take up much more space than desired, even stretching their container beyond the screen edge on small screens. min-width is defined to win against competing width...

...until we know for sure which image version we will need and the solution becomes very simple. Here is a small helper function for your mailer views: def inline!(version...

Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...

tl;dr Individual transform properties are great because they allow you to write more readable and maintainable CSS, especially when...

...Although this may be useful for debugging, when writing custom steps you may be better off using XPath...

regular-expressions.info

Look-arounds provide a way to match context-dependant. You can look-behind, look-ahead and to both in a positive and negative way. The look-around will...

...Modifiers in Ruby Add modifiers after the final slash, e.g. /Regex/im, or at the beginning of the regex, e.g. /(?i)regex/. i: case insensitivity m: make the .-character also match...

...way to calculate the signature is to use an HMAC. Unfortunately, I don't believe you can calculate a proper HMAC in a regular Apache installation. Instead, we do something...

makandra dev
api.rubyonrails.org

ActiveModel supplies an errors object that behaves similar to a Hash. It can be used to add errors to a record, as well as to query the record for registered...