If you're using Paperclip to store and convert images attached to your models, processing a lot of images will...

makandracards.com

Our rcov:all task for aggregated RSpec/Cucumber coverage was overhauled extensively. Among other things it now works for Rails 2...

Code coverage is the ratio of code lines kissed by a test vs. the total number of lines in your...

jstorimer.com

Guide to writing CLI scripts in Ruby that play nice with pipe chains.

github.com

When internationalizing your Rails app, you'll be replacing strings like 'Please enter your name' with t('.name_prompt'). You...

For university I have to stay up-to-date with lecture documents. Since my university doesn't offer RSS feeds...

rhnh.net

I introduced DataMapper on my last two major projects. As those projects matured after I had left, they both migrated...

You have to specify the environment with -e env_name or RAILS_ENV=env_name if you want to run...

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