makandra dev
github.com

Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.

Sometimes you want one distinct version of RubyGems to be installed to replicate the same behavior across multiple servers.

makandra dev

This note summarizes the ruby exception hierarchy. Exception NoMemoryError ScriptError LoadError NotImplementedError SyntaxError SignalException Interrupt Timeout::Error # < ruby 1.9.2 StandardError...

Our gitpt script to generate git commits from Pivotal Tracker stories has been tweaked and polished and is now part...

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...

github.com

Note: capistrano_colors was merged into Capistrano starting from v2.13.5. However, this requires Ruby 1.9+. If you cannot upgrade Capistrano...

makandra dev
github.com

Ruby bindings for Sundown, a fast and full-featured Markdown parser that lets you define renders for arbitrary output formats...

jstorimer.com

Guide to writing CLI scripts in Ruby that play nice with pipe chains.

github.com

When internationalizing your Rails app, you'll be replacing strings like 'Please enter your name' with t('.name_prompt'). You...

github.com

When Rack::Bug has been added to your project and your Apache2/Passenger only replies with an Error 500 (Internal Server...

github.com

Framework to write command-line apps in Ruby. Comes with a nice way of processing parameter options, some utility classes...

apidock.com

[1,2,3,4].sample # => e.g. 4 If you'd like to cheat and give different weights to each element...

makandra dev

When you use one line Ruby comments in ERB templates you should never do this (notice the whitespace in front...

sequel.rubyforge.org

Seems like a useful gem for cases where ActiveRecord is overkill but you don't want to do everything by...

rails-erd.rubyforge.org

Gem to generate entity relationship diagrams from your Rails 3 ActiveRecord models. The diagram style is pretty and configurable.

For performance improvements (and to remove the need for eager loading), the ActsAsTaggableOn gem supports caching your tag lists directly...

blog.carbonfive.com

I still see people promoting various gems and plugins to handle miscellaneous configuration elements for your application. One little known...

beginrescueend.com

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...

makandra dev

ActiveSupport's memoize has a dangerous feature you might not know about. Assume you have class DeepThought extend ActiveSupport::Memoizable...

require 'open-uri' File.open('/target/path/to/downloaded.file', "wb") do |file| file.write open('http://example.com/your.file').read end Basic Authentication