Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Standup 12/16/09

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

  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.

  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:

    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.


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

  3. Luke Melia says:

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

  4. Arun says:

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

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *