After updating your RubyGems, you will probably not be able to run Capistrano any more, but receive an error similar...

makandra dev
innig.net

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

On 32bit systems, the maximum representable Time is 2038-01-19 03:14:07 in UTC or 2038-01-19...

makandra dev

This tool is used on our application servers (and called when deploying) but it also works locally. Just call dumple...

The code below shows a method #validate which uses Nokogiri to validate an XML document against an XSD schema. It...

A check if two date or time ranges A and B overlap needs to cover a lot of cases:

Note: Consider not doing this. Use form models or vanilla methods instead. The :conditions option for Rails associations cannot take...

Given those modules: module A def foo; end def bar; end end module B end When you want to call...

makandra dev

Given group size If you would like to split a Ruby array into pairs of two, you can use the...

When defining a trait using the Modularity gem, you must take extra steps to define constants to avoid caveats (like...

In case https://www.rubydoc.info/ is to slow or offline, you can also read a gem documentation offline. Start a server...

opensoul.org

I love ETags, but there’s something that annoys me: most implementations revolve around pulling a record out of a...

Are you adding a "Then show me the page" and re-run Cucumber whenever there is a failing scenario? Don...

If you're on Ubuntu: sudo apt-get install ruby-dev On other platforms: Look for a package containing ruby...

Call geordi clean from a project root to remove unused and unnecessary files inside it. This script is part of...

Update: This trick probably isn't very useful anymore in Ruby 2.x. The Ruby GC has improved a lot...

justinfrench.com

If you’re testing the behavior of deprecated code in your Ruby project, the warning messages littered throughout your spec...

If you want to iterate over a Range, but only look at every n-th element, use the step method...

When your block takes an argument that should have an default, only in Ruby 1.9 you can say: block = lambda...

timeless.judofyr.net

This must be one of the coolest, yet quite unknown, technique in Ruby. For certain types of problems (e.g. when...

In regular expressions you can use the zero-width pattern \b to match the beginning or end of a word...

You can usually just use the eq matched to compare two numbers: expect(deal.total).to eq(120)

opensoul.org

How to create an infinitely nestable hash that always defaults to a new hash if a key does not map...

github.com

Ruby's net/http is setup to never verify SSL certificates by default. Most ruby libraries do the same. That means...