Commit fba9b79cfdb7974f0c8f31d533f8b9f16cd97404

Authored by Stephen Crosby
2 parents 5639825e ddcf21ea
Exists in master and in 1 other branch production

Merge pull request #966 from stevecrozz/ruby-version-error

incompatible ruby version error
Showing 1 changed file with 8 additions and 0 deletions   Show diff stats
Gemfile
... ... @@ -4,6 +4,14 @@ RAILS_VERSION = '~> 4.2.0'
4 4  
5 5 send :ruby, ENV['GEMFILE_RUBY_VERSION'] if ENV['GEMFILE_RUBY_VERSION']
6 6  
  7 +detected_ruby_version = Gem::Version.new(RUBY_VERSION.dup)
  8 +required_ruby_version = Gem::Version.new('2.1.0') # minimum supported version
  9 +
  10 +if detected_ruby_version < required_ruby_version
  11 + fail RuntimeError, "RUBY_VERSION must be at least #{required_ruby_version}" \
  12 + ", detected RUBY_VERSION #{RUBY_VERSION}"
  13 +end
  14 +
7 15 gem 'actionmailer', RAILS_VERSION
8 16 gem 'actionpack', RAILS_VERSION
9 17 gem 'railties', RAILS_VERSION
... ...