2018-03-21 22:37:57 +00:00
|
|
|
def rails5?
|
|
|
|
%w[1 true].include?(ENV["RAILS5"])
|
|
|
|
end
|
2011-10-08 21:36:38 +00:00
|
|
|
|
2018-03-21 22:37:57 +00:00
|
|
|
require 'rubygems' unless rails5?
|
|
|
|
|
|
|
|
gemfile = rails5? ? "Gemfile.rails5" : "Gemfile"
|
|
|
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__)
|
2011-10-08 21:36:38 +00:00
|
|
|
|
2018-03-21 22:37:57 +00:00
|
|
|
# Set up gems listed in the Gemfile.
|
2016-05-08 21:33:34 +00:00
|
|
|
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
2018-07-20 11:58:17 +00:00
|
|
|
begin
|
|
|
|
require 'bootsnap/setup'
|
|
|
|
rescue LoadError
|
|
|
|
# bootsnap is optional dependency, so if we don't have it it's fine
|
|
|
|
end
|