boot.rb 682 B

12345678910111213141516171819
  1. unless ENV.key?('RAILS_ENV')
  2. STDERR.puts 'ERROR: Missing RAILS_ENV environment variable, please set it to "production", "development", or "test".'
  3. exit 1
  4. end
  5. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
  6. require 'bundler/setup' # Set up gems listed in the Gemfile.
  7. require 'bootsnap' # Speed up boot time by caching expensive operations.
  8. Bootsnap.setup(
  9. cache_dir: File.expand_path('../tmp/cache', __dir__),
  10. development_mode: ENV.fetch('RAILS_ENV', 'development') == 'development',
  11. load_path_cache: true,
  12. autoload_paths_cache: true,
  13. disable_trace: false,
  14. compile_cache_iseq: false,
  15. compile_cache_yaml: false
  16. )