How to checkout submodules in Gitlab CI

Posted Almost 3 years ago by Emanuel.

Accessing other repositories in Gitlab CI is not straight forward, since the access rights of the current pipeline might not...

NVM: How to automatically switch version when changing directories

Posted Almost 3 years ago by Arne Hartherz.

The Node Version Manager allows installing multiple NodeJS versions and switching between them. By default, it does not automatically switch...

Ruby: Fixing strings with invalid encoding and converting to UTF-8

Posted Almost 3 years ago by Arne Hartherz.

When dealing with external data sources, you may have to deal with improperly encoded strings. While you should prefer deciding...

When does Webpacker compile?

Posted About 3 years ago by Henning Koch.

Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...

Bundler: Packaging gems into the git repository (offline installation)

Posted About 3 years ago by Emanuel.

Installing gems on a server that has no access to the internet (especially rubygems.org) requires to bundle the gems into...

How to push to Git without running CI on GitLab CI, GitHub Actions, or Travis CI

Posted About 3 years ago by Arne Hartherz.

If a project ist configured to spawn CI runners for tests or deployment when pushing to the Repo, a habit...

Delivering Carrierwave attachments to authorized users only

Posted About 3 years ago by Dominic Beger.

To attach files to your records, you will need a new database column representing the filename of the file...

Capybara: Preventing headless Chrome from freezing your test suite

Posted About 3 years ago by Henning Koch.

We prefer to run our end-to-end tests with headless Chrome. While it's a very stable solution overall...

Capybara: Preventing server errors from failing your test

Posted About 3 years ago by Henning Koch.

When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...

RSpec: How to test the content of a flash message in a request spec

Posted About 3 years ago by Emanuel.

The ActionDispatch module of Rails gives you the helper method flash to access the flash messages in a response.

Webmock < 3.12.1 cannot handle IPv6 addresses correctly

Posted About 3 years ago.

We had the issue, that a VCR spec failed, after updating CarrierWave from version 0.11.0 to 1.3.2. In this version...

Making ZSH the default shell on Ubuntu 20.04

Posted About 3 years ago by Emanuel.

ZSH is an alternative command line shell that includes some features like spelling correction, cd automation, better theme, and plugin...

CarrierWave: Default Configuration and Suggested Changes

Posted About 3 years ago by Dominik Schöler.

CarrierWave comes with a set of default configuration options which make sense in most cases. However, you should review these...

Best practices for REST API design

Posted About 3 years ago by Emanuel.
stackoverflow.blog

A rough guide how to implement a REST API. The discussion here includes some interesting points as well: Timestamps: ISO8601...

Running old ImageMagick versions in a Docker container

Posted About 3 years ago by Michael Leimstädtner.

If your project depends on an old version of ImageMagick that you can no longer install in your system, you...

Parallelize Development Using Git Worktrees

Posted About 3 years ago by Julian.

You can use git worktree to manage multiple working trees attached to the same repository. But why should I use...

Regular Expressions: Quantifier modes

Posted About 3 years ago by Henning Koch.

When you repeat a subpattern with a *, + or {...} operator, you may choose between greedy, lazy and possessive modes. Switching modes...

Linux: How to make a terminal window title reflect the current path

Posted About 3 years ago by Arne Hartherz.

By default, your terminal emulator (Gnome Terminal, Terminator, etc.) sets some kind of window title to reflect the shell type...

DNS debug tools

Posted About 3 years ago.

There are several tools for DNS debugging which offer you more or less information. Most of the time the more...

Git: Parsing large diffs as a human

Posted Over 3 years ago by Michael Leimstädtner.

I just finished migrating a project from the Asset Pipeline to Webpacker, this is what my diff to master looks...

Transporting blank values in URL queries

Posted Over 3 years ago by Henning Koch.

URLs can transport key/value pairs ("parameters") using this syntax: /path?foo=bar If the value is blank, mind these subtle...

How to build a fully custom TinyMCE 5 dialog

Posted Over 3 years ago.

TinyMCE is a WYSIWYG editor which is quite customizable. Add a custom button to the tinyMCE toolbar and tell tinyMCE...

Configuring Webpacker deployments with Capistrano

Posted Over 3 years ago by Dominik Schöler.

When deploying a Rails application that is using Webpacker and Capistrano, there are a few configuration tweaks that optimize the...

How to have a target=_blank link open with DevTools open

Posted Over 3 years ago by Dominik Schöler.
stackoverflow.com

In the tab where you need it, open Chrome DevTools with F12, open settings with F1, scroll down to the...