aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides.rb
blob: 367ed0b12e1033aa270eb1e2eb335e7dd55916c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pwd = File.dirname(__FILE__)
$:.unshift pwd

begin
  # Guides generation in the Rails repo.
  as_lib = File.join(pwd, "../activesupport/lib")
  ap_lib = File.join(pwd, "../actionpack/lib")

  $:.unshift as_lib if File.directory?(as_lib)
  $:.unshift ap_lib if File.directory?(ap_lib)
rescue LoadError
  # Guides generation from gems.
  gem "actionpack", '>= 3.0'
end

require "rails_guides/generator"
RailsGuides::Generator.new.generate