mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: do not boot Ruby if not on 2.4 or up
This commit is contained in:
parent
788ca1f112
commit
39bfd836c6
@ -1,5 +1,16 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
begin
|
||||||
|
if !RUBY_VERSION.match?(/^2\.[456]/)
|
||||||
|
STDERR.puts "Discourse requires Ruby 2.4.0 or up"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
rescue
|
||||||
|
# no String#match?
|
||||||
|
STDERR.puts "Discourse requires Ruby 2.4.0 or up"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
require File.expand_path('../boot', __FILE__)
|
require File.expand_path('../boot', __FILE__)
|
||||||
require 'rails/all'
|
require 'rails/all'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user