URI("...").to_s will get you an even cleaner URL by removing the port. 

URI.scheme_list[scheme.upcase].build(:host => host, :port => port, :path => path) can do it too :)

This comment is entirely up to your own sense of aesthetics, it can be checked in as is too :)