For a recent project, I had a couple views with code like this:
<% if @users.count == 0 %>
This worked perfectly in development mode... I rolled it out to prod mode and it exploded, saying that count was not a valid method of Array. I changed every instance to use Array#length instead and it seems to be working.
1) What is the reason for this difference in behavior?
2) Are there any other exciting differences between dev and prod modes that I should watch out for?
MORAL: Make sure your production hosting environment uses the same version of Ruby as your local development environment. :)
Thank you
Tom