fix issues from updating to rails 4; fix deploy script