Improved the migration to rails 4 and bundle checking.