If Rails or Rake are complaining about a missing gem that is listed in your Gemfile.lock and the listed version...

makandra dev

When you run rake db:create and get this error message Couldn't create database for {"encoding"=>"utf8", "username"=>"root...

stackoverflow.com

Most likely you run rake and your code is causing an exception which is not the one shown in your...

When you put a Rake task into lib/tasks, but running it fails with... Don't know how to build task...

makandra dev
blog.rubybestpractices.com

class Errormaster CoffeeIsOut = Class.new(StandardError) # is prettier than class CoffeeIsOut < StandardError; end end Reference such an error class with Errormaster...

Selenium does not speak SSL because it uses WEBrick that doesn't. When you use Selenium for Cucumber scenarios that...

Observed on Rails 2.3 and machinist 1.0.6 Like the title says, when you define the method empty? like in the...

There is a bug in Rails 3's dbconsole script, which makes the following command open a database console for...

Remember how Rails 2 came with an awesome feature that broke all code using Time.now or Time.parse? This behavior is...

Simple: Tell the application controller how to handle exceptions, here a RecordNotFound error. Do this with the following line: # application_controller.rb...

Ever wondered how Rails talks to itself in a Cucumber feature? In Rails 3 you can do it like this...

Do you have page caching enabled for the development environment and there are cached pages lying around in public/?

weblog.rubyonrails.org

jQuery as new default Javascript library, streaming response support, attr_accessible with roles, prepared statements, easier migrations.

I believe that when WEBrick has trouble bringing up your Rails application, the WEBrick component that is supposed to print...

When writing a piece of reusable code, you sometimes need to have separate code for Rails 2 and Rails 3...

If you have any class which requires access to some path methods generated by your routes. Even though you could...

You've been there: A form cannot be submitted, but you don't see a validation error because the field...

Rails doesn't know which host it is running on. For generating links, it strips the hostname off the request...

After updating Rubygems you see a wall of deprecation warnings like this: NOTE: Gem::SourceIndex#add_spec is deprecated, use...

Sometimes the Rails helper #distance_of_time_in_words is using too much magic. When you need a time difference...

Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...

Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some...

tl;dr: Always have your attachment path start with :rails_root/storage/#{Rails.env}#{ENV['RAILS_TEST_NUMBER']}/. The directory where you...

makandra dev

When you need to create a locale for a language variant (like Austrian for German), you probably don't want...