...use this kind of call if your code is run by a background job. Better, don't use it at all. Exception Notifier 2.6 and 3 ExceptionNotifier::Notifier.background_exception_notification...

When you try to remove a non-existing index using remove_index, the migration will incorrectly pass without an error...

I ran into a situation in which I received the yarn integrity check warning when starting the rails console even...

There are several ways to merge two (or more) PDF files to a single file using the Linux command line...

...to when precompiling your assets, and give your stylesheets access to all the regular bells and whistles (like asset_path, proper @imports etc): class DynamicStylesheetsController < ApplicationController def show logical_path...

Rails comes with a Rake task notes that shows code comments that start with "TODO", "FIXME", or "OPTIMIZE".

...the first time it was referred to, causing user to be loaded, which Ruby believed it had not seen before. And that caused a completely different spec to fail at...

There seems to be no built-in matcher in RSpec to check if a string contains terms in the desired...

...error" message: *** [err :: example.com] There are no Phusion Passenger-served applications running whose paths begin with '/var/www/example.com'. *** [err :: example.com] This is just because there were no running passenger process for...

makandra dev

Git has two kind of tags: annotated lightweight Annotated tags are stored as full objects in the Git database. They...

tl;dr: Do not use merge! for session hashes. Use update instead. Outline Let's assume you're modifying the...

Like you know from "How to tell ActiveRecord how to preload associations (either JOINs or separate queries)", you can tell...

makandra dev

...For this reason it is recommended to use a dev server during development. This behavior can be disabled by the compile: true setting in config/webpacker.yml. Note that this can also...

a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is thus the same as -M50%. Similarly, -M05 is the same as -M5...

...searched for executables, CDPATH contains the list of directories that are available for cd. Besides the current directory (.), you can add others to that. The trick is to add a...

...directory, always use a prefix for your bookmarks. @ works well. This has also has benefits for the usage with autocompletion. Example usage: >cd Projects/makandra-cards/ ./Projects/makandra-cards/ >mark @cards >cd ~ >pwd

makandra dev
innig.net

If you want to get a deep understanding of how closures, blocks, procs & lambdas in Ruby work, check out the...

makandra dev

Spreewald now has a spreewald binary that lists all available steps, optionally filtering them. Example: $> spreewald # All Spreewald steps

If you are using Angular and want something like Rails' simple_format which HTML-formats a plain-text input into...

To achieve this goal you have to setup the session store like the following example: MyApp::Application.config.session_store( :cookie_store...

...it with additional joins or conditions. We call this chaining scopes. In practice chaining becomes problematic when scope chains grow more complex. In particular having JOINs in your scope will...

...year is the week with January 4th in it. All days in this week belong to the year. This means that January 1st, 2nd and 3rd may or may not...

...the year. I am not sure which year December days in the same week belong to, I believe the week actually gets split into two calendar weeks in two different...

This will show you how to create a RSS feed that the Feed Validator considers valid. Note that RSS is...

Rails flashes (FlashHash) track a list of used keys, which is not respected when comparing flash hashes.

makandracards.com

If you get an error message like this: You have already activated some-gem 1.2.3, but your Gemfile requires some...