diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-03-22 09:37:57 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-03-22 09:37:57 +1100 |
commit | 36bedfb7f37931a33d9af586296404c02c3ab80e (patch) | |
tree | 9ca6e11053aea141c50030cb6e1de04c24b3432f /config/boot.rb | |
parent | 5ae91f323d054341c0d012de85835ef40f1bf9f8 (diff) | |
download | gitlab-ce-36bedfb7f37931a33d9af586296404c02c3ab80e.tar.gz |
[Rails5] Update files by `rails app:update`blackst0ne-rails5-update-files-by-rails-app-update
Diffstat (limited to 'config/boot.rb')
-rw-r--r-- | config/boot.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/config/boot.rb b/config/boot.rb index f2830ae3166..84f390f3228 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,6 +1,11 @@ -require 'rubygems' +def rails5? + %w[1 true].include?(ENV["RAILS5"]) +end -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +require 'rubygems' unless rails5? + +gemfile = rails5? ? "Gemfile.rails5" : "Gemfile" +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__) +# Set up gems listed in the Gemfile. require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) |