update Rails to 4.2.0; fix deprecation warnings