Posts tagged rake

Jul15

Fixing slow rake on Leopard

mysql rails rake ruby ruby on rails | comments

HTML parse error: 
<div class="flair">
  <img src="http://farm1.static.flickr.com/96/225360722_8ef2a43077_m.jpg" width="240" height="160" alt="Hay Rake Third Version" /><br />
  <div class="text-backing"> </div>
  <div class="text">Photo by <a href="http://www.flickr.com/photos/jbat/">JBAT</a></div>
Continue reading »

May26

When Rake fails but tests succeed

rails rake fixtures rails rake fixtures | comments

When testing Ruby on Rails, every so often you’ll find that rake fails in testing while running a test directly succeeds. How frustrating!

The crux of the problem is typically a missing fixture in the test class. What happens is that the data from your missing fixture is loaded in the test database, masking the problem when running a test individually. Since the order of operations on a rake test is clearly different than running a test singularly, there is a good chance that the data your test depends on simply is not loaded during the rake process. Unless you add that missing fixture, of course.

Continue reading »