gitlab-org--gitlab-foss/config/boot.rb

17 lines
437 B
Ruby
Raw Normal View History

def rails5?
!%w[0 false].include?(ENV["RAILS5"])
end
2011-10-08 17:36:38 -04:00
require 'rubygems' unless rails5?
gemfile = rails5? ? "Gemfile" : "Gemfile.rails4"
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__)
2011-10-08 17:36:38 -04:00
# Set up gems listed in the Gemfile.
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
begin
require 'bootsnap/setup'
rescue LoadError
# bootsnap is an optional dependency, so if we don't have it, it's fine
end