You may know the double asterisk operator from Ruby snippets like Dir['spec/**/*_spec.rb'] where it expands to an arbitrary...
Ruby's regular expressions can be represented differently. When serializing them, you probably want to use inspect instead of to...
Exercise 1: XML On the start page of your Movie DB, show the title of a random movie that is...
Adopting legacy Rails apps Talk to your mentor about how we're approaching applications that are either old or abandoned...
So you're getting an error like this: undefined method `activate_bin_path' for Gem:Module (NoMethodError)
TL;DR: Update the 'net-ssh' gem by adding to your Gemfile: gem 'net-ssh', '=2.9.1' Now run bundle update...
So you're getting this failure when running bundle install on an older project: Your Gemfile.lock is corrupt. The following...
Plot graphs in Ruby WebGraphviz renders in your browser via JavaScript (to store the rendered graph, extract the SVG using...
This card tries to summarize by example the different uses of heredoc. In Ruby << vs. <<- vs. <<~ In Rails strip_heredoc...
You can use three different versions of the regular expression syntax in grep: basic: -G extended: -E(POSIX)
When you're writing specs for ActiveRecord models that use memoization, a simple #reload will not do: it 'updates on...
Yesterday I stumbled across a talk in which the guy mentioned module sub-classing. I was curious what you can...
In order to have monitoring for Sidekiq (like queue sizes, last run of Sidekiq) your application should have a monitoring...
Detect if a gem has been activated A gem is activated if it is either in the current bundle (Gemfile.lock...
We have released a new library Gemika to help test a gem against multiple versions of Ruby, gem dependencies and...
ActiveSupport::Notifications provides an instrumentation API for Ruby. It is used throughout rails to publish instrumentation events that include information...
In this article, we’ll look at what side effects are, why they are problematic despite being necessary, and how...
Presentation about optimizing Ruby on Rails apps. From Nico Hagenburger (homify's lead frontend developer).
Ruby's __FILE__ keyword returns the path to the current file. On popular for this are Ruby binaries: #!/usr/bin/env ruby...
Here is a symbol of an eight note: ♪ Its two-byte hex representation is 0x266A. This card describes how to...
You can define methods using def or define_method. In the real world, there is no performance difference.
This is quite an edge case, and appears like a bug in Rails (4.2.6) to me. Update: This is now...
Note: This applies to plain Ruby scripts, Rails does not have this issue. When you work with Ruby strings, those...
Ruby 2.3.0 has been around since end of 2015. It brings some pretty nice new features! Make sure to read...