Instead of running all missing migrations on your test database with rake db:migrate RAILS_ENV=test you can also...

...Safari, ...) or Firefox, this is only the initial size -- users can resize textareas to become bigger. This is helpful to the user, but may be breaking your application layout in...

This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...

blog.jayfields.com

Deprecated ways to execute shell code in Ruby This is just a reference for legacy code. For new code, always...

As attachments to this card you will find a Cucumber feature and supplementing step definition that you can use to...

Do all of the above, and also Remove all blocks and hooks belonging to craken from your config/deploy.rb. Delete vendor/plugins/craken. Check if you have lib/tasks/craken.rb. If so, delete...

I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...

We recently decided to put static content for HouseTrip.com to Amazon Cloudfront for a faster user experience. This happens fully...

makandra dev

The Rails asset pipeline improves delivery of application assets (javascripts, stylesheets, images, fonts). Here are some basic facts about its...

web.archive.org

Capistrano 2 brings the shell command which allows you to run commands on your deployment targets. There is also invoke...

xaprb.com

The linked article explains how to get a database-wide lock without creating table rows: This article explains how I...

...include(3, 4, 5) evaluates to: NOT( .to include(3, 4, 5) ) However, it behaves like: .to (NOT include(3) && NOT include(4) && NOT include(5) ) Warning

When paginating records, we usually need to know the number of total records in order to render pagination links. Popular...

redis.io

In production, you (or your ops team) should configure a maximum number of bytes that Redis can use to store...

...per group but only one value can be picked for the results. The default behaviour of MySQL prior to version 5.7 will not complain and arbitrarily choose a value. But...

Inside before :each blocks you can refer to variables that you introduce via let later on. They do not need...

With puma you can have concurrent requests. There are two concepts on how Puma can handle two incoming requests: Workers...

When the Ruby parser module of Ruby-GetText comes across a file in one of its search directories (e.g. lib/scripts...

When you use the send_file method to send a local file to the browser, you can save resources on...

github.com

The linked rbenv plugin rbenv-each is very helpful to keep QoL gems up to date that are not part...

tl;dr Since Rails 6.1+ you can use .compact_blank or .compact_blank! to remove blank values from collections (e.g...

You can use JavaScript to get or set cookie values on the client. Using the vanilla JavaScript API

...to a value. The validation is skipped silently when terms is nil. While this behavior is useful to validate acceptance in the frontend and not the admin backend, it also...

Active Record's select method allows you to make use of the power of MySQL select statements. On the one...