Permalink
Browse files

Fix Rails app preloading: load_application_classes is an instance met…

…hod of Rails::Initializer. Partially fixes issue #359.
  • Loading branch information...
1 parent 23e4251 commit edaa45c2dc0e00a52819efa9eb9227210ba1abd4 @jpatterson jpatterson committed with FooBarWidget Aug 23, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/phusion_passenger/railz/application_spawner.rb
@@ -321,7 +321,7 @@ def load_environment_with_passenger
# isn't copy-on-write friendly.
# - Rails >= 2.2 already preloads application sources by default, so no need
# to do that again.
- if GC.copy_on_write_friendly? && !::Rails::Initializer.respond_to?(:load_application_classes)
+ if GC.copy_on_write_friendly? && !::Rails::Initializer.method_defined?(:load_application_classes)
Dir.glob('app/{models,controllers,helpers}/*.rb').each do |file|
require_dependency canonicalize_path(file)
end

0 comments on commit edaa45c

Please sign in to comment.