Pivotal Labs

Standup 7/23/2008

edit Posted by Davis W. Frank on Wednesday July 23, 2008 at 04:39PM

Interesting Things

  • Y!Slow + Firebug + submit a form will cause the result to be pulled from cache instead of hitting your server. The workaround is to disable Y!Slow.
  • Some of our customers are requesting targeting Firefox 3, which has some rendering differences from FF2. So we're adding FF3 to the system image with a new icon and the correct trick to let it run side-by-side with FF2.
  • On a related note, rumor is that Facebook is dropping support for IE6. So is 37Signals.
  • Interesting issues with the Globalize plugin & Rails 2.1:
    • The currency formatting code does not work at all anymore - it always uses a '$'
    • Their work for localizing templates, which involves injecting a fully-qualified path, breaks #assert_template. The workaround is to comment out the path injection code, but this only works if you don't have localized templates.
  • EngineYard's eycap gem version 0.3.6 now has better support for deploying from SVN tags
    • Deploying from tag, since the URL was different used to do a rm -rf, which takes a long time on EY's GFS disks for large file sizes. This was causing a customer's deploy taking ~20 minutes
    • The fix was to change eycap to use svn switch; the deploy now takes ~1 minute

Ask for Help

"Anyone seen/solved an issue with random font size increase using Firebug 1.1 or later?"

The issue is that at some point a page will render with much larger fonts and the CSS exploration won't tell you why. The work around is to launch a browser with Firebug disabled and run it side by side with the same page in a window with Firebug enabled (restarting the 2nd window whenever the problem occurs.)

Seeing this with Firefox 2 and 3 and any Firebug later than 1.05 (which doesn't run on FF3). This might be an issue with IFRAMEs, but we're not sure. No data found on this via Google searches or the Firebug group. We will post there.

Standup 07/22/2008

edit Posted by Davis W. Frank on Tuesday July 22, 2008 at 04:24PM

Interesting Things

  • New Relic is presenting at our Tech Talk this week. Expect good information about using their real-time performance monitoring tool on your Rails projects.
  • Pivotal Tracker, our home-grown Agile project management site, should get even more beta tonight. Users should be able to create their own projects! Check it out.

Standup 07/21/2008

edit Posted by Davis W. Frank on Monday July 21, 2008 at 04:45PM

Interesting Things

  • Model#update_all is your friend if you're not yet on Rails 2.1

    Like Model#update_attribute for each attribute, #update_all will save direct to the database, bypassing validation, updating only the columns you specify. In Rails 2.1, with partial model updates, you may not need this. But if you've not yet upgraded your application, then give #update_all a try.

Update: fixed per comment. Model#update_attribute does not validate. Thanks for the catch!

Standup 07/16/2008

edit Posted by Sean Beckett on Wednesday July 16, 2008 at 04:49PM

Interesting Things

  • It's always a good idea to test your backup and recovery strategy, but while doing so one team of Pivots found that restoring MySQL was more painful than they had expected. Restoring the backup to the master database and then replaying the binary logs to the right point but no further took a lot of manual attention and time. Is there a utility to ease the pain of restoring MySQL from backup?

Standup 07/15/2008

edit Posted by Sean Beckett on Tuesday July 15, 2008 at 04:33PM

Interesting Things

  • If using Desert and Rails 2.1, if the first view loaded is from a plugin things blow up.

Ask for Help

"How can I make follow_redirect go to a URL?"

When using a follow_redirect to a URL instead of a hash, the test fails with a string conversion exception. No solutions were forthcoming.

Standup 07/14/2008

edit Posted by Sean Beckett on Monday July 14, 2008 at 05:26PM

Interesting Things

  • Congratulations to Engine Yard on closing $15M Series B financing!
  • After a catastrophic HDD failure, one Pivot found 1password on his iPhone to be invaluable in restoring all his login credentials.

Standup Free Slurpee! 07/11/2008

edit Posted by Joe Moore on Friday July 11, 2008 at 04:50PM

Standup fun-stuff edition!

Interesting Things

Free Slurpee Day at 7-Eleven!

  • Where are all of the Pivots? Hmmm...

iPhone 3G Launch, AT&T Store  iPhone 3G Launch, SF Apple Store

Ask for Help

"Sometimes find(:first, :order => 'id DESC') returns the records in the wrong order!"

Rails 2.0.2. Roughly 1 out of every 15 times, the first id is not the first one returned. Very very strange.

Standup 07/10/2008

edit Posted by Joe Moore on Thursday July 10, 2008 at 07:58PM

Update 07/11/2008: A fix has been committed for the :named_scope_-column-collision issue.

Interesting Things

  • In Rails 2.0.2, we have seen a strange behavior when you have a belongs_to association declared on an ActiveRecord class, but the table does not have a foreign key for that relationship. Within a session, everything appears normal. The child object will still be saved, the parent object can even be reloaded. But by the next session, the child object is in the database, but cannot be retrieved.
  • When using named_scope, adding a :joins option will "mix-in" all of the attributes from that join table into your retrieved object, potentially overwriting any colliding attributes (including id ... ouch!). There was consensus that this was a valuable feature, when used "properly". Adding :select option can avoid this, or use :include.
  • We ran into an issue when using the JS Routes plugin in combination with Rails' asset packaging. When asset packaging is invoked using <%= javascript_include_tag 'named_routes', 'xxx', :cache => true %> the named_routes.js file usually has not been generated, and application crashes at startup. Solution: we created a rake task to generate the named_routes.js file and run that as part of our deploy process.

Ask for Help

"Why did my JS respond_to block suddenly start rendering the HTML template instead of the RJS template?"

Rails 2.0.2; controller, action, respond_to block all work as expected. Just wrong file gets rendered. They fixed the problem by adding an explicit call to render but this should not be necessary. Suggestion is to move from the template.rhtml naming scheme to template.mime-type.render-engine scheme and see if it is fixed.

Standup 07/09/2008

edit Posted by Joe Moore on Wednesday July 09, 2008 at 04:30PM

Interesting Things

Ask for Help

"When monit kills our Mongrels, our in-progress transactions are committed, not rolled-back!"

This is with Rails 1.99. Has anyone heard of this?

Standup 07/08/2008

edit Posted by Joe Moore on Tuesday July 08, 2008 at 04:40PM

Interesting Things

  • Are you a OS X guru? Pivotal Labs is looking for a OS X Desktop Support tech. If you are interested, contact us!

Ask for Help

"Does anyone have suggestions for debugging Safari-specific JavaScript problems?"

Suggestion: download the nightly build of Safari/WebKit, which has a real JavaScript debugging tool.

"After switching from Selenium RC Fu to Polonium, our Selenium tests run extremely slow."

The affect is similar to Selenium's slow-mode.

Other articles: