Use ::Rails.version.to_s instead of ::Rails.version, currently Rails.version returns an instance of Gem::Version