How to enable Chromedriver logging

Posted Over 4 years ago by Arne Hartherz.

When using Chrome for Selenium tests, the chromedriver binary will be used to control Chrome. To debug problems that stem...

Convert SCSS to SASS

Posted Over 4 years ago by Daniel Straßner.

The ruby sass gem also installs a command line tool to convert to and from SCSS. Use it for a...

Rails: Do not load frameworks you don't need

Posted Over 4 years ago by Tobias Kraze.

Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...

Ruby: How to use global variables for a conditional debugger

Posted Over 4 years ago by Emanuel.

You can share a state in Ruby with global variables. Even if you should avoid them whenever possible, for debugging...

Unpoly: Automatically show the full better_errors page when Rails raises an error

Posted Over 4 years ago by Henning Koch.

When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...

Webpack(er): A primer

Posted Over 4 years ago by Tobias Kraze.

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...

Installing Ruby 2.3 or below on Ubuntu 17 and above

Posted Over 4 years ago by Dominik Schöler.
github.com

From Ubuntu 17, rbenv fails to install Ruby below 2.4 because of a mismatching OpenSSL dependency: it needs libssl1.0-dev for...

RubyMine: Efficiently filtering results in the "Finder" overlay

Posted Over 4 years ago by Michael Leimstädtner.

RubyMine comes with a nice way to grep through your project's files: The finder (ctrl + shift + f). Don't...

How to make RubyMine aware of Cucumber steps defined in gems

Posted Almost 5 years ago by Stefan Wagner.

If your Ruby project includes a gem like Spreewald that comes with some external step definition, RubyMine does not know...

How to get a backtrace if rspec (or any other ruby process) hangs with no output

Posted Almost 5 years ago by Martin Schaflitzl.

If rspec hangs with no output and you dont get a backtrace neither with --backtrace nor by just killing it...

Unpoly: Testing values for presence or blankness

Posted Almost 5 years ago by Henning Koch.

In Ruby on Rails, all objects have a useful blank? method. It returns true for nil but also for empty...

How to: Fix json 1.8.3 with Ruby 2.5

Posted Almost 5 years ago by Emanuel.

The gem json fails to install for Ruby 2.5 if you use a version equal or below 1.8.3.

Documenting your Rails project's Node.js version in .nvmrc

Posted Almost 5 years ago by Henning Koch.

Not all versions of Node.js are compatible with each other. Also npm packages may require a minimum or maximum version...

Bundler: How to install version 1 instead of 2 (latest version)

Posted Almost 5 years ago by Emanuel.

When installing a gem you can use version comparators like >= or ~>. That way it is possible to fetch the latest...

cucumber_factory: How to keep using Cucumber 2 Transforms in Cucumber 3

Posted Almost 5 years ago by Michael Leimstädtner.

Cucumber up to version 2 had a neat feature called Step Argument Transforms which was dropped in favor of Cucumber...

How to recognize CVE-2019-5418

Posted Almost 5 years ago by Judith Roth.

If you get requests with values for formats like this: {:locale=>[:de], :formats=>["../../../../../../../../../../etc/services{{"], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby...

Capybara: Testing file downloads

Posted Almost 5 years ago by Emanuel.

Download buttons can be difficult to test, especially with Selenium. Depending on browser, user settings and response headers, one of...

Ruby: Using named groups in Regex

Posted Almost 5 years ago by Emanuel.

An alternative of using a multiple assignment for a Regex are named groups. Especially when your Regex becomes more complicates...

Function Composition in Ruby

Posted Almost 5 years ago by Henning Koch.
thoughtbot.com

Along with a number of other cool new features and performance improvements, Ruby 2.6 added function composition to the Proc...

Tod: A Gem for handling daytime without a date

Posted Almost 5 years ago by Jakob Scholz.

Tod is a gem for working with daytimes. Another additional gem? Thus SQL has a time datatype for storing time...

When reading model columns during class definition, you must handle a missing/empty database

Posted Almost 5 years ago by Arne Hartherz.

When doing some meta-programming magic and you want to do something for all attributes of a class, you may...

Migration from the Asset Pipeline to Webpacker

Posted Almost 5 years ago by Emanuel.

This is a short overview of things that are required to upgrade a project from the Asset Pipeline to Webpacker...

During deployment: "You are trying to install in deployment mode after changing your Gemfile"

Posted Almost 5 years ago by Thomas Eisenbarth.

While deploying an Ruby update to an old application these days, we encountered the following misleading error: *** [err :: some-host.makandra.de] You...

Why you can't use timezone codes like "PST" or "BST" for Time objects

Posted About 5 years ago by Arne Hartherz.

Rails' ActiveSupport::TimeWithZone objects have both a timezone code and offset, e.g. Thu, 28 Mar 2019 16:00:00 CET...