Upgrade to rails 4
Fixes for rails4...