Rails supports time zones, but there are several pitfalls. Most importantly because Time.now and Time.current are completely different things and...

Database connections are not thread-safe. That's why ActiveRecord uses a separate database connection for each thread.

This card compares patterns to store trees in a relation database like MySQL or PostgreSQL. Implementation examples are for the...

Hint This applies only to distributions based on Debian. Requirement You need to setup the PostgreSQL Apt Repository first.

makandra Operations

on the bash (issued as postgres user) Start/Stop/Restart PostgreSQL pg_ctl -D $configdir start|stop|restart Start/Stop/Restart the corresponding PostgreSQL...

There are various ways to run external commands from within Ruby, but the most powerful ones are Open3.capture3 and Open3.popen3...

We generally use multiple application servers (at least two) and you have to search on all of them if you...

First find the reference for the entry you want through looking at the stash: $ git stash list stash@{0}: WIP...

Sometimes huge refactorings or refactoring of core concepts of your application are necessary for being able to meet new requirements...

In general, you should not put a block element inside an inline element. So don't do this: text

This card tries to summarize by example the different uses of heredoc. In Ruby << vs. <<- vs. <<~ In Rails strip_heredoc...

There is no CSS selector for matching elements that contains a given string ¹. Luckily, Capybara offers the :text option to...

If you want to find the commits that touched a specific text in a file, use git log -G 'text...

When your controller action raises an unhandled exception, Rails will look at the exception's class and choose an appropriate...

PostgreSQL, unlike MySQL, treats strings as case sensitive in all circumstances. This includes comparison with = and LIKE collision detection in...

Is your application doing something expensive every few seconds? Maybe an animated slider that rotates images? Maybe you are updating...

By convention, common protocols use a defined port, like 80 for HTTP or 443 for HTTPS. You can use nmap...

When building a web application, one is tempted to claim it "done" too early. Make sure you check this list...

Chrome's developer tools automagically choose vertical or horizontal panel layout, based on their width. You can disable that magic...

As your Rails project grows, you will accumulate a number of small patches. These will usually fix a bug in...

When dealing with time zones in Rails, there is one key fact to keep in mind: Rails has configurable time...

Expecting a primitive value as an argument to a method invocation is easy: expect(object).to receive(:foo).with('arg1...

This card existed before, but was outdated due to browser implementation changes. The information below is validated for the current...

If you want to perform a failover on another haproxy backend server this is the way you should do it...