So you got this error, even though your Gemfile bundles mysql2: !!! Missing the mysql2 gem. Add it to your Gemfile...

Our rspec_candy gem now gives you three matchers: be_same_number_as Tests if the given number is the...

You can use String#demodulize from ActiveSupport: "ActiveRecord::CoreExtensions::String::Inflections".demodulize # => "Inflections" "Inflections".demodulize # => "Inflections"

When you develop a gem and you have a Gemfile in your project directory, you might be surprised that your...

makandra dev

Consul 0.4.0 comes with some new features. Dependencies Consul no longer requires assignable_values, it's optional for when you...

github.com

paper_trail is an excellent gem to track record versions and changes. You almost never want to reimplement something like...

The will_paginate gem will show a default of 30 records per page. If you want to test pagination in...

Sometimes, you may want to open up a second database connection, to a read slave or another database. When doing...

For my Gem Session project Holly I ran the Ironman of drag'n'drop implementations: Dragging in nested lists

Today, I ran into trouble on a fairly fresh installed VM, running Ubuntu. I tried to bundle install and got...

stackoverflow.com

When you use method_missing to have an object return something on a method call, always make sure you also...

When refactoring a sequence of steps to a new, more descriptive step, you can use the steps method and Ruby...

makandra dev

You can specify the version of bundler to execute a command (most often you need an older version of bundler...

makandra dev
ruby-lang.org

It's the last bugfix release. We will get another year of security fixes, then no more patches.

makandracards.com

Updated the card with our current best practice (shared app code and specs via symlinks).

makandra dev

has_defaults is now a gem, no longer a plugin. The plugin version no longer exists. Note that plugins are...

ActiveSupport::Memoizable will be removed from Rails and has a lot of strange caveats that will ruin your day.

stackoverflow.com

Rack has a limit for how many form parameters it will parse. This limit is 65536 by default.

makandracards.com

I posted a solution which is awesome and also does natural sorting.

Sometimes you need to remove high Unicode characters from a string, so all characters have a code point between 0...

makandra dev

Ruby 1.9.2 is very slow when loading files, especially starting Rails servers or running specs takes forever.

Always use simply require 'spec_helper' If you mix it up like require 'spec_helper' require File.dirname(__FILE__) + '/../spec_helper'

ActiveSupport >= 3 has Date.parse('2011-02-10').beginning_of_quarter #=> 2011-01-01 Date.parse('2011-02-10').end_of_quarter...

If you're suffering from a huge de.yml or similiar file, cry no more. Rails lets you freely organize your...