This note summarizes the ruby exception hierarchy. Exception NoMemoryError ScriptError LoadError NotImplementedError SyntaxError SignalException Interrupt Timeout::Error # < ruby 1.9.2 StandardError...
Using .downcase or .upcase on strings containing umlauts does not work as expected in Ruby versions before 2.4. It leaves...
When selecting records in a date range, take care not to do it like this: start_date = Date.parse('2007-05...
Although it's tempting flirt with detecting mobile/touch devices with CSS media queries or Javascript feature detection alone, this approach...
The tagged_with scope comes with many awesome options to modify your search: User.tagged_with("awesome", "cool") # Users that are...
Note: capistrano_colors was merged into Capistrano starting from v2.13.5. However, this requires Ruby 1.9+. If you cannot upgrade Capistrano...
Ruby bindings for Sundown, a fast and full-featured Markdown parser that lets you define renders for arbitrary output formats...
Our rcov:all task for aggregated RSpec/Cucumber coverage was overhauled extensively. Among other things it now works for Rails 2...
Association named 'variations' was not found; perhaps you misspelled it? I just was hunting down a strange error with this...
When you're getting this error, one possibility is that you've created a select field for an association instead...
Guide to writing CLI scripts in Ruby that play nice with pipe chains.
One of the most common production errors are ActionController::MethodNotAllowed errors. They usually happen when someone reloads a form by...
When internationalizing your Rails app, you'll be replacing strings like 'Please enter your name' with t('.name_prompt'). You...
When Rack::Bug has been added to your project and your Apache2/Passenger only replies with an Error 500 (Internal Server...
Framework to write command-line apps in Ruby. Comes with a nice way of processing parameter options, some utility classes...
[1,2,3,4].sample # => e.g. 4 If you'd like to cheat and give different weights to each element...
When you use one line Ruby comments in ERB templates you should never do this (notice the whitespace in front...
The SQL code generated by Graticule's spherical distance computation is insufficient and can lead to NULL distances in edge...
Seems like a useful gem for cases where ActiveRecord is overkill but you don't want to do everything by...
Using rename_column, remove_column, etc. more than once in a migration makes that migration run slower than it should...
For performance improvements (and to remove the need for eager loading), the ActsAsTaggableOn gem supports caching your tag lists directly...
To use different Ruby versions on your computer you can use the Ruby Version Manager. It also allows you to...
"Classic" Excel (XLS) has a magic limit of 65535 rows per worksheet. This was fixed in XLSX but the version...
When you have objects in your database that hold latitude and longitude and you want to find others that are...