Rails4 working

These changes were enough to get rails 4, spree, spree_auth_devise and deface playing fine. Haven't looked at the build yet. Will do that next.

Also I think now is a good time to merge master into the rails4 branch. Looks like master has some fixes that the rails 4 branch would need too. Please let me know if you'd like to merge it and I can add the commits to this PR.