makandra dev
github.com

Gem to get Ruby 1.9 features in Ruby 1.8.

makandra dev
github.com

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

makandra dev

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

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

beginrescueend.com

To use different Ruby versions on your computer you can use the Ruby Version Manager. It also allows you to...

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

There are several options, but most of them are impractical. The best way is to use the :ruby filter:

Note: This applies specifically to MySQL. In PostgreSQL for example, this is not an issue. If you care about performance...

By default, Rails views escape HTML in any strings you insert. If you want to insert HTML verbatim, you need...

rubyinside.com

While 2.0 will include a number of syntax changes, new features and general improvements, mentioned below, it is anticipated to...

The most common use case for Ruby's #collect is to call a method on each list element and collect...

makandra dev

In order to monitor a Rake task using God your Rake file must write a file with its process ID...

When you require the Ruby debugger to be available from your Rails console (e.g. you want to inspect a method...

makandra dev

Oniguruma is an advanced regular expression engine for Ruby. Install Oniguruma with binary dependencies like this: sudo apt-get install...