Add to_s for Rails.version

Due to rails/rails#8501.

Change-Id: I04e90597fa270fc74817bd1fdb46a3676bae3102