Permalink
Browse files

This fixes rake for me in RefineryCMS. Otherwise, I get: undefined me…

…thod 'prerequisites' for nil:NilClass (from rspec)
  • Loading branch information...
1 parent 8b0806e commit 9e88b872858f0fa0800c313287cfb773a5dd44ea @parndt parndt committed May 26, 2011
Showing with 5 additions and 7 deletions.
  1. +5 −6 railties/lib/rails/application.rb
  2. +0 −1 railties/lib/rails/railtie.rb
@@ -211,12 +211,11 @@ def default_middleware_stack
end
def initialize_tasks
- self.class.rake_tasks do
- require "rails/tasks"
- task :environment do
- $rails_rake_task = true
- require_environment!
- end
+ extend Rake::DSL if defined? Rake::DSL
+ require "rails/tasks"
+ task :environment do
+ $rails_rake_task = true
+ require_environment!
end
end
@@ -181,7 +181,6 @@ def load_console
end
def load_tasks
- extend Rake::DSL if defined? Rake::DSL
self.class.rake_tasks.each(&:call)
end

0 comments on commit 9e88b87

Please sign in to comment.