While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the...
If you have problems installing a gem and get a error collect2: error: ld returned 1 exit status it's...
Ruby has Enumerable.find(&block), which returns the first item in the collection for which the block evaluates to true.
To update your Rubygems to the latest available version, type the following: gem update --system Note that you have a...
On Ruby 1.9+, standard ruby character classes like \w, \d will only match 7-Bit ASCII characters: "foo" =~ /\w+/ # matches...
To check which rubygems versions your different rbenv rubys are using, you can use this small bash script:
MarcoPolo shows your app name and environment in your console prompt so you don't accidentally break production Officially supporting...
Here is how to start your Rails application to accept both HTTP and HTTPS in development. gem install passenger
CTRL + SHIFT + ALT + N Search for any symbol in your application, like CSS classes, Ruby classes, methods, helpers etc...
The Bullet gem is designed to help you increase your application's performance by reducing the number of queries it...
Very detailed guide to caching Ruby on Rails. Goes well with the official Rails guide on caching.
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...
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...
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...
Re-creating a complex ActiveRecord scenario quickly without setting up a full-blown Rails app can come in handy e.g...
There are times when you have a chunk of text that you want to do something with, e.g. replace something...
TL;DR Under certain circumstances, dynamically defined symbols may break keyword arguments in Ruby 2.2. This was fixed in Ruby...
It is a common misunderstanding that all [op]=-operators work the same way, but actually they don't. ||= and &&=
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...
In RSpec you can tag examples or example groups with any tags you like simply by saying describe ReportCreator, slow...