Commit 46edb9d0 authored by Samir Noir's avatar Samir Noir 🧀
Browse files

simplify boot.rb file

parent 4c4b045c
......@@ -14,33 +14,6 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'rubygems'
# Do not use the standard boot options
# has we use a vendored bundler
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
require 'yaml'
# Attempts to use a vendored Bundler, if any
vendored_gems = File.expand_path(
'../../vendor/bundle/ruby/2.5.0/gems', __FILE__
)
vendored_bundler = Dir["#{vendored_gems}/bundler-*/lib"].sort.last
if !vendored_bundler.nil? && !$LOAD_PATH.include?(vendored_bundler)
$LOAD_PATH.unshift(vendored_bundler)
end
# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment