Rails.version must force to_s after rails 4

Rails.version now return a Gem::Version instance. If we want a string
from it, we should call .to_s method. this is also backwards compatible
[ref rails/rails#8501]