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

Standup 12/16/09

Matthew Kocher
Wednesday, December 16, 2009

Ask for Help

  • “Does anyone know why directory globbing order differs by system architecture?”
    This problem bit this stand up blogger yesterday. An entire directory was required, and on a mac the order is alphabetical. On linux it’s apparently random, most likely based on inode order. Ruby doesn’t gaurantee an order, so something that may “just work” on a mac purely by luck might not work on linux/bsd/windows.
  • “Is anyone using unicorn on EngineYard?”
    Not yet.

Interesting Things

*Keep files continued – The keep file will cause the original file to be retained, so just touching the keep file is fine. No need to mess with sym links or anything of the sort

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

4 Comments

  1. Dan Kubb says:

    I tend to always sort the order of files returned from a directory globbing so that I can ensure the behavior is identical between different systems the code might be running on.

    I’ve been bitten by this before where I had a set of rake tasks I was dynamically importing with “tasks/*.rake”, and one defined a constant referred to by other tasks. It worked perfectly on my mac but broke when I deployed it to the FreeBSD server.

    I wish Ruby enforced some sort of consistency on the directory order on it’s own, but I can understand why they might choose to not interfere with the OS behavior.

    December 16, 2009 at 12:11 pm

  2. Malc Locke says:

    Certainly on my Linux (Debian Lenny), globs return sorted by default, and sorted appears to be the default for the GNU libc glob() function, with an optional flag to turn it off:

    GLOB_NOSORT
    Don’t sort the file names; return them in no particular order. (In practice, the order will depend on the order of the entries in the directory.) The only reason not to sort is to save time.

    See http://www.gnu.org/s/libc/manual/html_node/Flags-for-Globbing.html

    Maybe the flavour of Linux you are using is doing something funky …

    December 16, 2009 at 12:59 pm

  3. Luke Melia says:

    We’re using Unicorn at EngineYard at Weplay. Working great. Let me know if you have questions.

    December 16, 2009 at 1:51 pm

  4. Arun says:

    Ezra tweeted today mentioning 2.7% of EY apps are now running Nginx + Unicorn.

    http://twitter.com/ezmobius/status/6743375678

    December 16, 2009 at 4:51 pm

Add New Comment Cancel reply

Your email address will not be published.

Matthew Kocher

Matthew Kocher
San Francisco

Recent Posts

  • Did we git pair?
  • Service Oriented Foreman
  • 05/30/2012: Resque Me
Subscribe to Matthew's Feed

Author Topics

chef (5)
devops (3)
osx (1)
guiderails (1)
rails (1)
1.9.2 (1)
rvm (1)
amazon (3)
ec2 (3)
agile (3)
  • 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 >