Support Rails 4 RC2

Modified the dependency version of rails and railties to fix the dependent problem when using Rails 4 RC2.