Why secure-only cookies used to be necessary Cookies have an optional secure flag. It tells the browser to not...

On some machines, installing Ruby 1.8.7 with ruby-build can lead to this error: math.c:37:13: error: missing binary...

stackoverflow.com

Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...

Whenever is a Ruby gem that provides a nicer syntax for writing and deploying cron jobs. Leading zeros are important...

To catch all possible exceptions from a network call, we need to rescue many error classes like this: rescue SocketError...

When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...

Just like Ruby Gems tag their version releases to the corresponding Git commit, it can be helpful to track production...

jsfiddle.net

When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself.

When you find yourself constantly ignoring a RubyMine warning, you can simple disable that warning and de-clutter your editor...

You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...

The httpclient gem comes with a custom SSL cert store. While an customizable, application-level cert store is great when...

You need to update a lof gems. Make sure you don't have any version constraints in your...

stackoverflow.com

Your default postgres user is named like your linux user. That default user has limited access privileges, which can cause...

Use bundler > 1.15 to fix Gem::LOADED_SPECS_MUTEX (NameError). Given the following project: ruby -v ruby 1.8.7

When installing gems, a lot of time is spent building locally installed documentation that you probably never use.

makandra dev
github.com

Katapult 0.3.0 brings Rails 5 and Ruby 2.5 support with a new design, plus a ton of smaller features, fixes...

Enumerable#all? returns true for an empty collection. This totally makes sense but you have to think about it when...

rubylearning.com

This article will show you how to use throw and catch. It's a nice tool to break out of...

makandra dev
makandracards.com

Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...

github.com

When writing XLSX files, there are gems like rubyXL or axlsx. While they do offer features like formatting or graphs...

PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02...

Summary: Don't add chromedriver-helper to the Gemfile the executables might break your tests in projects where chromedriver-helper...

A common pattern in Ruby is to to require all files in a specific diretory, using something like Dir.glob(Rails.root.join...

Checking if a JavaScript value is of a given type can be very confusing: There are two operators typeof and...