diff options
author | Xavier Noria <fxn@hashref.com> | 2009-10-10 22:59:13 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2009-10-10 22:59:13 +0200 |
commit | 2b2de865944c1b3565411da42a7da5760f7146d2 (patch) | |
tree | 3ec281f6a3c3effce0d9a9344e885c1f927dc0e5 | |
parent | 66ee2654ff243f03595a402fa15e1eea1b5b45be (diff) | |
download | rails-2b2de865944c1b3565411da42a7da5760f7146d2.tar.gz rails-2b2de865944c1b3565411da42a7da5760f7146d2.tar.bz2 rails-2b2de865944c1b3565411da42a7da5760f7146d2.zip |
requires rubygems in all cases, fixes guides generation
-rw-r--r-- | railties/guides/rails_guides.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/railties/guides/rails_guides.rb b/railties/guides/rails_guides.rb index e0532812e4..0d9458bf0f 100644 --- a/railties/guides/rails_guides.rb +++ b/railties/guides/rails_guides.rb @@ -1,5 +1,8 @@ pwd = File.dirname(__FILE__) -$: << pwd +$:.unshift pwd + +# Loading Action Pack requires rack and erubis. +require 'rubygems' begin as_lib = File.join(pwd, "../../activesupport/lib") @@ -11,7 +14,6 @@ begin require "action_controller" require "action_view" rescue LoadError - require 'rubygems' gem "actionpack", '>= 2.3' require "action_controller" @@ -19,7 +21,6 @@ rescue LoadError end begin - require 'rubygems' gem 'RedCloth', '>= 4.1.1' rescue Gem::LoadError $stderr.puts %(Generating Guides requires RedCloth 4.1.1+) @@ -29,11 +30,11 @@ end require 'redcloth' module RailsGuides - autoload :Generator, "rails_guides/generator" - autoload :Indexer, "rails_guides/indexer" - autoload :Helpers, "rails_guides/helpers" + autoload :Generator, "rails_guides/generator" + autoload :Indexer, "rails_guides/indexer" + autoload :Helpers, "rails_guides/helpers" autoload :TextileExtensions, "rails_guides/textile_extensions" - autoload :Levenshtein, "rails_guides/levenshtein" + autoload :Levenshtein, "rails_guides/levenshtein" end RedCloth.send(:include, RailsGuides::TextileExtensions) |