This is a shot in the dark. I would also verify that the environment that you are deploying this app to is using the same version of ruby and rails.
I was getting all kinds of syntax errors when I deployed my last app and went about crazy until I realized I hadn't adjusted my rvm.