Replaced ::ActiveRecord.gem_version with version

::ActiveRecord.gem_version is not available in Rails 4.0.2