Add #to_s method to rails version

In Rails 4 master `Rails.version` return `Gem::Version`, so we need `to_s`.