makandra dev
github.com

Sometimes you need to run background jobs that you can't make important guarantees about - they may run out of...

If a SOAP API expects you to call a remote method with arguments of complex types, Savon lets you manually...

Today I ran into this: Invalid gemspec in [/usr/local/rvm/gems/ruby-1.9.3-p194/specifications/ZenTest-4.9.3.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]. You need a newer Rubygems version. Try...

devalot.com

Good article about ruby singleton classes.

Developing complex regular expressions quickly blows my mind. Here are some online regex editors that help you by highlighting matching...

makandra dev
semaphoreci.com

Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...

gist.github.com

Re-creating a complex ActiveRecord scenario quickly without setting up a full-blown Rails app can come in handy e.g...

makandra dev
plugins.jetbrains.com

There are times when you have a chunk of text that you want to do something with, e.g. replace something...

bugs.ruby-lang.org

TL;DR Under certain circumstances, dynamically defined symbols may break keyword arguments in Ruby 2.2. This was fixed in Ruby...

rubyinside.com

It is a common misunderstanding that all [op]=-operators work the same way, but actually they don't. ||= and &&=

iana.org

When using send_file (for example for attachments of any kind), make sure your application knows the correct mime types...

You can freeze any Ruby object to prevent further modification. If you freeze an ActiveRecord and try to set an...

relishapp.com

In RSpec you can tag examples or example groups with any tags you like simply by saying describe ReportCreator, slow...

If you want to grow a Ruby Array, you might find out about #fill but it is not really what...

makandra dev

Code folding is a very useful feature to me. It gives me a quick overview over a file and keeps...

When using threads, you must make your code thread-safe. This can be done by either locking (mutexes) all data...

Today I learned that Ruby on Rails has shipped with a built-in slug generator since Rails 2.2:

makandra dev
github.com

Nested exceptions for Ruby: When you rescue an error and then re-raise your own, you don't have to...

Web applications can be used by multiple users at the same time. A typical application server like Passenger has multiple...

If you need to log to a file you can use Ruby's Logger class: require 'logger'

Dusen (our search gem) is now capable of excluding words, phrases and qualified fields from search. E.g. search for

This is useful to kill processes like ruby my-script.rb: pkill -f my-script.rb With great power comes great responsibility.

github.com

You can hook into Slack when using Capistrano for deployment. The slackistrano gem does most of the heavy lifting for...

If you're on Ruby 2.3+ there's a <<~ operator to automatically unindent HEREDOCs: str = <<~MESSAGE Hello Universe!