Fixing Ruby Rake on Windows

Posted by science on March 25, 2009

slash circle
I found a nice article recently which lets you remove the batch files from Ruby when running on Windows, so you don’t get those annoying, redundant cmd messages “Terminate Batch Job (y/n)” whenever you press ctrl-c within Ruby. My version (1.8.6) exits cleanly now – thanks Ruby Rambler!

http://rubyrambler.blogspot.com/2007/10/terminate-batch-job-yn-y.html

My specific steps for fixing Rake are:

  1. rename “rake.bat” to “rake.bat.orig” (or whatever)
  2. rename “rake” to “rake.rb”

Continuous Testing and Testing Single Methods in Ruby on Rails 5

Posted by science on March 25, 2009

Under a Microscope
Testing in Rails is crucial to effective development. Many people have opted for rspec over Test::Unit for this, but I find that Test::Unit meets all my needs. It’s simple and reliable, which is all I want in a test framework.

I do want two pretty simple features for Rails tests though. I want to manually run a single test easily, and sometimes even just run a single method inside a test. I also want to automatically re-run a test, whenever that test file is edited.

I’ve written some rake tasks to accomplish these basic activities – hopefully you’ll find them as useful as I do.
Continue reading…

Science

Posted by science on March 06, 2009

Science is simply the process of approximating observed complexity.