If you would like to use language specific layout (e.g. background-images) in your applications stylesheets you can achieve this...

Instead of running all missing migrations on your test database with rake db:migrate RAILS_ENV=test you can also...

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

Web fonts are awesome. After being restricted to Arial for two decades there is finally a cross-browser way to...

RSpec 1 (Rails 2) With the most recent spec_candy.rb helpers you can say: User.stub_any_instance(:foo => :bar) user = User.new...

If you specify different ports, you can run multiple local webricks with rails server --port=300X at the same time...

If you want to know the exact hits on your website (or whatever logfile you want) for a specific date...

RSpec lets you define the arguments with which you expect a method to be invoked: subject.should_receive(:say).with('hello...

github.com

Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...

Given the problem you have a new column postion and that column should be updated for all existing rows with...

Generally for nested forms, a blank form is placed below all other existing object forms. If you would like to...

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

stackoverflow.com

Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.

web.archive.org

Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...

makandra dev

Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...

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

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

whatsmydns.net

whatsmydns.net is an online service that allows you to instantly perform a DNS lookup to check a hostnames current IP...

Consider you have a website vhost listening to www.example.com, redirecting all incoming requests that do not talk about the configured...

Whenever Firefox updates, all your Cucumber features that use Selenium break. This is annoying. In order to remedy this, version...

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

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

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