diff options
Diffstat (limited to 'railties/lib/rails_generator.rb')
-rw-r--r-- | railties/lib/rails_generator.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/railties/lib/rails_generator.rb b/railties/lib/rails_generator.rb index 9f0ffc1562..201a9e0f91 100644 --- a/railties/lib/rails_generator.rb +++ b/railties/lib/rails_generator.rb @@ -21,16 +21,18 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ -$:.unshift(File.dirname(__FILE__)) -$:.unshift(File.dirname(__FILE__) + "/../../activesupport/lib") - begin - require 'active_support' + require 'active_support' rescue LoadError - require 'rubygems' - gem 'activesupport' + activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" + if File.directory?(activesupport_path) + $:.unshift activesupport_path + require 'active_support' + end end +require 'active_support/core/all' +$:.unshift(File.dirname(__FILE__)) require 'rails_generator/base' require 'rails_generator/lookup' require 'rails_generator/commands' |