aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/rails/app/templates/config/boot.rb
blob: e91304451b989fee7069fc2f6c1fb547c71c6bc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Use Bundler (preferred)
environment = File.expand_path('../../vendor/gems/environment', __FILE__)
if File.exist?("#{environment}.rb")
  require environment

# Use 2.x style vendor/rails and RubyGems
else
  vendor_rails = File.expand_path('../../vendor/rails', __FILE__)
  if File.exist?(vendor_rails)
    Dir["#{vendor_rails}/*/lib"].each { |path| $:.unshift(path) }
  end

  require 'rubygems'
end

<% unless options[:skip_activerecord] -%>
require 'rails/all'

# To pick the frameworks you want, remove 'require "rails/all"'
# and list the framework railties that you want:
#
# require "active_support/railtie"
# require "active_model/railtie"
# require "active_record/railtie"
# require "action_controller/railtie"
# require "action_view/railtie"
# require "action_mailer/railtie"
# require "active_resource/railtie"
<% else -%>
# Pick the frameworks you want:
# require "active_model/railtie"
# require "active_record/railtie"
require "active_support/railtie"
require "action_controller/railtie"
require "action_view/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
<% end -%>