Sha256: 057a8e0a0b47755f8334aed00da30fc46fe6e5c35b0e0ca75668f28d17e8ee0e
Contents?: true
Size: 756 Bytes
Versions: 73
Compression:
Stored size: 756 Bytes
Contents
# Go ahead and fail if not using Ruby 1.9.3, no since in letting people # squarm for answers def raise_version_error(message) puts message Rails.logger.info(message) if defined?(Rails) && Rails.logger raise end def invalid_version? RUBY_VERSION =~ /([\d]+)\.([\d]+)\.([\d]+)/ major, minor, revision = $1.to_i, $2.to_i, $3.to_i if defined?(JRUBY_VERSION) major <= 1 && minor <= 9 && revision <= 1 else major <= 1 && minor <= 9 && revision <= 2 end end if invalid_version? message = %{ Mongoid requires MRI version 1.9.3+ or JRuby 1.6.0+ running in 1.9 mode. Your current Ruby version is defined as #{RUBY_VERSION}. Please see: http://mongoid.org/en/mongoid/docs/tips.html#ruby for details. } raise_version_error(message) end
Version data entries
73 entries across 68 versions & 6 rubygems