Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker
Pivotal Labs

Standup 11/12/2008: JSON2.js borked?

Pivotal Labs
Thursday, November 13, 2008

Interesting Things

  • JSON version 2 has problems with its JavaScript implementation json2.js, specifically when calling JSON.stringify() on arrays:

    // JSON version 1
    [1] => "[1]"
    
    
    // JSON version 2
    [1] => ""[1]""
    

    We’re not sure if this is a bug or a feature. We’re sticking with JSON version 1 until further notice.

  • Pivot Adam has a very interesting blog post about functors called Give up the func. Check it out!

Ask for Help

“We were having problems when mocking an ActiveRecord association under Mocha when we called expects on a method that calls a method.”

The solution was basically to not mock associations.

“Mod_rewrite + SSL was causing problems when redirecting to a subdomain behind SSL.”

A wild-card SSL certificate solves the problem.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 11/11/2008: Firefoxen goodness

Pivotal Labs
Thursday, November 13, 2008

Interesting Things

  • In response to our ask for help, Ray Baxter answered us in code with a script called Firefoxen. “It’s a script to automatically configure multiple installations of Firefox so that they open with different profiles.” You can grab Firefoxen on GitHub. Thanks Ray!
  • IE7 sends odd Accept headers (*.* instead of an explicit text/html) which can cause undesired behavior in Rails. Someone suggested manually setting the format in a before_filter:

    params[:format] ||= 'text/html'

    This was discouraged because it can cause problems elsewhere. A better solution was to put the html format at the top of any `respond_to` blocks:

    def show
      respond_to.html # run by default when type cannot be determined
      respond_to.js
    end
    
  • The Ruby MySQL Gem version 2.7 leaks memory for very large queries. The solution is to remove the 2.7 gem and manually install version 2.8 from source. This library is no longer a gem and must be installed from the mysql-ruby-2.8 tarball.

Ask for Help

“As a followup to Firefox SSL certificate problems…”

It turns out that our server running nginx had an old version of OpenSSL installed. Upgrading OpenSSL solved the problem.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 11/10/2008: Memory profiling tools for Ruby

Pivotal Labs
Thursday, November 13, 2008

Interesting Things

  • IntelliJ IDEA 8 was officially released over the weekend.

Ask for Help

“We’re having an issue with a long running Ruby process consuming too much memory and failing. What tools are available for finding and patching Ruby memory leaks?”

Several tools were suggested:

  • Valgrind – Considered very powerful but difficult to use. “It will do what you want if you can figure out how to properly ask it to do so.”
  • BleakHouse – Ruby specific leak detection. It’s available as a gem called “bleak_house”
  • Leaks – This is native to OSX. The Google Web Toolkit uses this for leak detection.
  • DTrace – Also a native OSX tool. There was a RailsConf presentation on Everyday DTrace on OSX.

“Rake will often silently ‘fail’ when running RSpec. It will not blow up but rather silently quits in the middle of the suite. This seems to happen intermittently, usually on the first run of our test suite. If we run the suite again, it works.”

It was suggested that this might be a Rake version issue since there have been other test suite problems with Rake 0.8.3. Though, this particular type of problem was not identical to previous Rake versioning issues and may be something altogether different.

Keep reading for a more detailed description of this weird RSpec + Rake issue.

More on the RSpec + Rake issue:

“It always manages to go through the integration tests, but when it hits the main tests, it will randomly quit (without a failure or error message) before all the tests are complete. At this point it’ll give us a summary message (X tests run, X tests passed) as if no other tests exist. We’ve worked on the problem a little bit this morning and tried the following things, all without success: >1) upgraded to the latest version of rspec and rspec-rails (1.1.11)
2) downgraded from rake 0.8.3 to 0.8.1
3) tried running with rspec and rspec-rails gems only
4) tried running with rspec and rspec-rails plugins only.

We’ve tried it on another machine with similar results. Right now, I want to say it only happens when we’ve modified a file in the project, but that may be confirmation bias (we ran about 60 full rakes on one machine where we have not been mucking about in the codebase and it seems to have successfully run all of them).

There was one other mention of this online in this ticket: http://rspec.lighthouseapp.com/projects/5645/tickets/587-conflict-with-loadby-and-reverse#ticket-587-3, paraphrased below:

‘This was caused by an error in handling a certain mal-formed spec; it was causing rspec to exit silently in the middle of one spec file. As I would edit files, –loadby mtime would cause them to load in different orders, which would then run different #s of examples because it would hit the file, and then quit silently, in different places’

You can close this one, I’ll report another bug that’s appropriate for the silent-exit-without-exception problem.”

Anyways, at this point we’re out of ideas and are leaving the problem behind for now, but we’d love to fix it, as it makes testing somewhat unpredictable.”

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Dan Podsedly

Tracker: the iPod of project management software?

Dan Podsedly
Wednesday, November 12, 2008

Nivi, from Venture Hacks, wrote a great article about why Pivotal Tracker is great for startups. It’s worth reading even if you’re already a fan of Tracker, and nails down the key ingredients to successful project management. Check it out:

http://venturehacks.com/articles/pivotal-tracker

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup 11/07/2008: Selenium for Flash

Joe Moore
Friday, November 7, 2008

Interesting Things

  • Teaser: Selenium for Flash! We’ve developed a Selenium-like framework for Flash. It’s pre-alpha, and needs to be extracted from it’s current home inside a project. Are you interested in a Selenium-like framework for Flash, or have you written one yourself? Let us know!
  • STI-weirdness. Rails surprise of the day: given a query of a has_many :photos where Photos has STI subclasses (got that?) Rails will build a SQL query that includes the subclass types of Photo, which you might not want:

    foo.photos.find_by_type("Photo")
    # query will have "... WHERE type IN ('Photo', 'OriginalPhoto', 'ThumbnailPhoto')"
    
  • It appears that the retardase_inhibitor might not work with Rails 2.1.X due to fixes in ActionMailer.

  • JetBrains has been hard at work: they have released both a new Ruby plugin for IntelliJ, and a ruby-specific IDE (based on IntelliJ) named RubyMine.
  • Check out Pivot Jonathan’s wife’s art exhibit at Artist-Xchange Gallery in San Francisco, Friday 11/7 from 7-10pm:

    Artist-Xchange Gallery
    3169 16th Street
    San Francisco
    CA 94103

Ask for Help

“I want to create a custom launcher for Firefox 2 and Firefox 3 with different profiles. Perhaps the real question is how do we create a custom version of a Mac application launcher, passing in the arguments we need?”

… without having to invoke it on the command line every time.

“We’re trying to delete cookies in our Controller, but they keep appearing in the headers anyway.”

Suggestion: make sure you are specifying your URL paths and domains correctly.

“Why won’t our CSS and other assets load the first time when accessing an SSL-protected domain on Engine Yard?”

It’s most likely not Engine Yard or Firefox 3′s fault. More research needed.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Pivotal Labs

Standup 11/6/2008

Pivotal Labs
Thursday, November 6, 2008

Ask for Help

“console.log seems to be broken again in Firebug with 1.2.1?”

People have had some success with 1.3 beta. Get Firebug

“Suggestions for creating PDF’s in Ruby?”

  • PDF Writer
  • Prawn
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Joe Moore

Standup… and VOTE!

Joe Moore
Tuesday, November 4, 2008

Interesting Things

  • It’s election day! If you are taking the time to read this geeky blog, you better have voted!

Ask for Help

“Is there some order-dependency issue with `has_many_polymorphs?”

We have a test that passes in isolation, but fails when the whole file is run.

“Any advice to setting up Lucine to allow us to search for strings with special characters, such as ‘-’, without having to wrap them in quotes?”

We have some Lucine knowledge here but feel free to give us your suggestions as well.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Dan Podsedly

Tracker API Released

Dan Podsedly
Sunday, November 2, 2008

We’ve released the first version of the Tracker API. It’s a RESTful HTTP XML interface, uses a simple, token-based authentication mechanism, and allows you to query as well as update stories in your projects.

To get started with the API, read through the API Help page (it includes examples), and create a token on your Profile page.

We plan to enhance the API and add support for more operations and formats (including JSON) based on your feedback. Please let us know what you’d like to see added, either by email or via Satisfaction.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Adam Milligan

Standup 10/24/2008: Floating point number formatting and you

Adam Milligan
Friday, October 24, 2008

Interesting Things

We have a project that generates a lot of highly precise floating point numbers. However, we primarily want to display these numbers with only two decimal places of precision. In addition, we want to display these numbers with standard comma delimiters to the left of the decimal point.

Sadly, the Ruby #sprintf method provides the former functionality, but not the latter. What to do? Use a Rails helper, of course.

The NumberHelper from ActionView provides some useful functionality, so we used that. As it turns out, we found the best way to get the formatting we want to be using the #number_to_currency function with no denomination.

Also, rather than mixing the entire helper into the Float class for just one method, we chose to mix the helper into a nested class and expose only the functionality that interests us. The result looks something like this:

class Float
  class RailsNumberHelpers
    extend ActionView::Helpers::NumberHelper
  end

  def formatted
    s = Float::RailsNumberHelpers.number_to_currency(self, :unit => '', :precision => 2).chomp('0')
  end
end
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Adam Milligan

Standup 10/23/2008: ARMailer warning!

Adam Milligan
Thursday, October 23, 2008

Interesting Things

  • ARMailer and ExceptionNotifer: A match not so much made in heaven.

If you use the ExceptionNotifier plugin (and if you don’t, why not?) and you install the ARMailer plugin, your app will stop sending the exception notifications. You have been warned. Initial reports suggest that fixing the problem is relatively straightforward.

For those not in the know, ARMailer is a plugin that queues all outbound email in your database, to be sent later by a cron job or something similar. Good for not clogging up your server with email processing during peak load.

Ask for Help

“Is it okay to load a Flash widget multiple times on a single page?”

General murmuring led to the conclusion that this works fine.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (778)
  • rails (113)
  • testing (86)
  • ruby (83)
  • ruby on rails (70)
  • jobs (62)
  • javascript (54)
  • techtalk (44)
  • rspec (38)
  • activerecord (29)
  • productivity (29)
  • gogaruco (29)
  • ironblogger (29)
  • git (28)
  • nyc (27)
  • rubymine (25)
  • mobile (22)
  • bloggerdome (20)
  • cucumber (20)
  • process (19)
  • pivotal tracker (19)
  • jasmine (19)
  • design (18)
  • ios (18)
  • webos (17)
  • objective-c (17)
  • android (16)
  • palm (16)
  • "soft" ware (16)
  • fun (15)
  • tracker ecosystem (15)
  • ci (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • bdd (14)
  • gem (13)
  • selenium (12)
  • css (12)
  • goruco (12)
  • bundler (12)
  • tdd (12)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
  • mojo (10)
  • chef (10)
  • rubygems (9)
Subscribe to agile Feed
  1. ←
  2. 1
  3. ...
  4. 56
  5. 57
  6. 58
  7. 59
  8. 60
  9. 61
  10. 62
  11. ...
  12. 78
  13. →
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >