From c7d0e0f5fe190c7321061f0abd836bfb8a46e9cc Mon Sep 17 00:00:00 2001 From: Edgars Beigarts Date: Sat, 20 Feb 2016 00:44:48 +0200 Subject: [PATCH] Check ruby version later when booting to avoid issues with dokku --- Gemfile | 8 -------- config/boot.rb | 10 ++++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 0762c3f..73e971e 100644 --- a/Gemfile +++ b/Gemfile @@ -4,14 +4,6 @@ RAILS_VERSION = '~> 4.2.5.1' send :ruby, ENV['GEMFILE_RUBY_VERSION'] if ENV['GEMFILE_RUBY_VERSION'] -detected_ruby_version = Gem::Version.new(RUBY_VERSION.dup) -required_ruby_version = Gem::Version.new('2.1.0') # minimum supported version - -if detected_ruby_version < required_ruby_version - fail "RUBY_VERSION must be at least #{required_ruby_version}, " \ - "detected RUBY_VERSION #{RUBY_VERSION}" -end - gem 'actionmailer', RAILS_VERSION gem 'actionpack', RAILS_VERSION gem 'railties', RAILS_VERSION diff --git a/config/boot.rb b/config/boot.rb index edd056a..52c08dc 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,13 @@ +require 'rubygems' + +detected_ruby_version = Gem::Version.new(RUBY_VERSION.dup) +required_ruby_version = Gem::Version.new('2.1.0') # minimum supported version + +if detected_ruby_version < required_ruby_version + fail "RUBY_VERSION must be at least #{required_ruby_version}, " \ + "detected RUBY_VERSION #{RUBY_VERSION}" +end + # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -- libgit2 0.21.2