If a Cucumber run deletes your application directory, an integration fail between Capybara and Capybara Screenshot may be the cause...
If you update Selenium regularly, you'll run into deprecation warnings similar to: WARN Selenium [:clear_local_storage] [DEPRECATION] clear...
PostgreSQL and ActiveRecord have a good support for storing dynamic attributes (hashes) in columns of type JSONB. But sometimes you...
tl;dr: Avoid to memoize methods with default (keyword) arguments! When you are using Memoized with default arguments or default...
Browsers blocks abusable JavaScript API calls until the user has interacted with the document. Examples would be opening new tab...
If your Webpack build is slow, you can use the Speed Measure Plugin for Webpack to figure out where time...
...to work as expected Good Then the crontab -l output will look like this: # Begin Whenever generated tasks for: some-app_staging 34 23 * * * /bin/bash -l -c 'cd /var/www/some-app_staging/releases/20201215171150 && RAILS...
...value, that can not be replaced by Whenever (the release folder changes every deploy): # Begin Whenever generated tasks for: /var/www/some-app_staging/releases/20201215171150 34 23 * * * /bin/bash -l -c 'cd /var/www/some-app_staging/releases/20201215171150 && RAILS_ENV=staging...
...also packaged as a snap. A snap will always track a channel (like stable, beta) and automatically update to the newest version available in this channel. By default the snap...
channels: stable: 2018.3.2 (72) 269MB classic candidate: 2018.3.2 (72) 269MB classic beta: 2018.3.2 (72) 269MB classic edge: 2018.3.2 (72) 269MB classic 2018.3/stable: 2018.3.2 (72) 269MB classic 2018.3/candidate...
You can unpack a .tar.gz file into the current directory like this: tar -xzvf archive.tar.gz The options used are
Imagine you want to write a cucumber test for a user-to-user chat. To do this, you need the...
Usually you add errors to :base in ActiveRecord, in case no appropriate attribute could be used to add the error...
If you want to see how long your database queries actually take, you need to disable MySQL's query cache...
When you have many changes, and you want to spread them across different commits, here is a way to stage...
To run additional code before an existing Rake tasks you can add a dependency like this: task :before_task...
Rails 6.1 has a "strict loading" mode that forces the developer to preload any association they plan to use. Associations...
You can tell npm to install a package globally with npm -g install @puppeteer/browsers. However, it seems that its not...
...calls html_safe if you're not escaping. FWIW, an HTML string may easily become invalid when truncated, e.g. when a closing tag gets chopped off. However, when the input...
Chromedriver (or selenium-webdriver?) will not reliably scroll elements into view before clicking them, and actually not click the element...
The sprintf method has a reference by name format option: sprintf("% d : % f", { :foo => 1, :bar => 2 }) # => 1 : 2.000000
To use a form model with devise, you can simply override #resource_class in a controller. A typical use case...
With this command you can run all the spec files which have been edited or added in the current branch...
As an application exists, data accumulates. While you'll be loosely monitoring the main models' record count, some supportive database...
If you use a newer SSH key generated with the ED25519 algorithm instead of RSA (see Create a new SSH...
...is a fix to SafeBuffer#gsub. Note that it will only fix the $1 behavior, not give you a safe string in the end (see below). Example def test(input...
...really expect outside code (read: Gems) to not use $1 (and there is plenty, believe me) when calling gsub on an input that may be a SafeBuffer, you need to...