Posts tagged rails

Feb23

Setting up watchr and Rails

ruby rails watchr autotest | comments

Autotest is a great idea. When it worked for me, I loved it. But I hardly ever used it. Our complicated codebase choked on it - something to do with accounts as subdomains or double-loading of test_helper when running the test suite or some such. Frankly, I don’t remember the details, but I do remember the multiple two-hour wild goose chases to try to get the lovely software to work for me. Unfortunately I wasn’t up to the task.

Continue reading »

Jan19

Rails date calculations could stand some timezone love

programming rails ruby | comments

New Rails handles a lot of timezone stuff for you. Set the appropriate time zone for the request and get an object from the DB, it’s created_at date will be translated from UTC to the request’s time zone.

Continue reading »

Nov11

Announcing time warp ruby gem

change time gem rails ruby time manipulation time warp | comments

When writing tests, it is often desirable to bend time to test limits and edges of the day. It is especially useful to warp time to test results across the timezones of the world. Manipulating time is also useful to assure a day of the week, month or year every time the test runs.

Continue reading »

Oct16

Fading flash message

flash message programming rails ruby | comments

Rails apps love flash messages. Little notes providing information, confirmation or warnings to the user. Typically implemented in a partial like so:

Continue reading »

Aug29

Windy City Rails

conference rails ruby | comments

HTML parse error: 
<div class='flair'>
<a href="http://www.windycityrails.org">
<img src="http://m.windycityrails.org/images/windycityrails_125.gif" width="125" height="125" alt="WindyCityRails - September 20, 2008 - I'm attending!" style="border:none;" />
Continue reading »

Aug21

Blogiversaire

programming rails ruby | comments

Four years baby. Soon the blog will be toting a lunch pail and school bag, off to decades of education. Next thing I know, my little baby will be married and have little blogs of its own. Blog, you grow up so fast!

Continue reading »

Jul22

Post Redirect Get in Rails

post/redirect/get rails ruby | comments

HTML parse error: 
<div class="flair">
  <img src="http://farm4.static.flickr.com/3039/2328731162_c8f837d78a_m.jpg" width="240" height="144" alt="Post St." /><br />
  <div class="text-backing">&nbsp;</div>
  <div class="text">Photo by <a href="http://flickr.com/photos/axis/">Terry Bain</a></div>
Continue reading »

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 »

Jun01

Presentation: an audience perspective

rails railsconf railsconf08 RailsConf RailsConf ‘08 Rails | comments

HTML parse error: 
<div class="flair">
  <img src="http://farm3.static.flickr.com/2032/2541589315_d20f683b6c_m_d.jpg" width="240" height="180" alt="Baked NYC" /><br />
  <div class="text-backing">&nbsp;</div>
  <div class="text">Photo by <a href="http://www.flickr.com/photos/peterhellberg/">Peter Hellberg</a></div>
Continue reading »

May28

RailsConf '08

rails railsconf railsconf08 RailsConf RailsConf '08 | comments

Just wanted to drop a note in my blog, here, that I will be attending RailsConf from Friday through Sunday. If any lurkers out there are gonna be in attendance, do drop me a note. Let’s meet each other!

Continue reading »

Feb28

Move server configuration files into your repository

capistrano rails ruby scm svn Ruby Rails SVN SCM Capistrano | comments

HTML parse error: 
<div class="flair">
  <img src="http://farm1.static.flickr.com/45/139177165_e3855c6686_m_d.jpg" width="240" height="180" alt="Dung repository" /><br />
  <div class="text-backing">&nbsp;</div>
  <div class="text">Photo by <a href="http://flickr.com/photos/cheesygarlicboy/">Chambo25</a></div>
Continue reading »

Oct29

World Clock Project

world clocks time rails | comments

Last week, the fellas at Iridesco and I put together a fun little Internet clock for your time-telling needs. It’s officially online and ready to give you the time of day in a world-conscious way.

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 »