The debugger gem does not seem to be properly working on Ruby 2. Use byebug instead! Byebug is a simple...
The attached RSpec matcher allows for comfortably testing delegation. Examples describe Post do it { should delegate(:name).to(:author).with...
SudoSlider is a simple yet powerful content slider that makes no (or very few) assumptions about your markup and is...
This card describes how to pass an array with multiple element to a JavaScript function, so that the first array...
You need this awkward command: page.driver.browser.action.move_to(page.find(selector).native).perform Note that there are better ways for newer Capybaras...
When you have a string containing umlauts which don't behave as expected (are not matched with a regexp, can...
There are 3 built-in file descriptors: stdin, stdout and stderr (std=standard). (You can define your own, see the...
When using @media CSS queries, Internet Explorer 8 and below will fail to respect them. Though there are several options...
Edge Rider gives your relations a method #origin_class that returns the class the relation is based on.
With this command you can initiate an application restart without touching restart.txt. Unlike touching restart.txt, this tool initiates the restart...
If you regularly get ActionView::MissingTemplate exceptions, maybe some bot visits your site requesting silly formats like: http://www.rails-app.com/makandra.html-username-2000...
Just found out about a great feature in Rails that seems to be around since Rails 2. Start a console...
You might have a table without a primary key set in MySQL. You can fix this by adding a primary...
Sometimes you have a test expectation but actually want a better error message in case of a failure. Here is...
Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...
A MySQL DECIMAL column is used when it is important to preserve exact precision. It takes two parameters, where...
We have released Modularity 2. It has many incompatible changes. See below for a script to migrate your applications automatically...
When a Ruby block or proc takes multiple parameters, and you call it with an Array, Ruby will unexpectedly splat...
Sometimes you need to monitor a connection from your machine to a specific, single host or network in order to...
Ubuntu 12.04 LTS x64, Ruby 1.8.7, Rails 2.13, PDFKit 0.5.4, Phusion Passenger Apache 2 I ran into this, when I...
Today I ran into trouble installing therubyracer on Ruby 1.8. The installation failed with *** extconf.rb failed *** Could not create Makefile...
Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is...
It is good programming practice to Don't Repeat Yourself (or DRY). In Ruby on Rails we keep our code...
So you client has asked you to implement a row of buttons to like the URL on Facebook, Twitter and...