diff --git a/activesupport/lib/active_support/file_update_checker.rb b/activesupport/lib/active_support/file_update_checker.rb index d6918bede2..78b627c286 100644 --- a/activesupport/lib/active_support/file_update_checker.rb +++ b/activesupport/lib/active_support/file_update_checker.rb @@ -92,7 +92,7 @@ module ActiveSupport def watched @watched || begin - all = @files.select { |f| File.exists?(f) } + all = @files.select { |f| File.exist?(f) } all.concat(Dir[@glob]) if @glob all end diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 4faaf5ef1e..d1e88cfafd 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -223,7 +223,7 @@ module Rails # you need to load files in lib/ during the application configuration as well. def add_lib_to_load_path! #:nodoc: path = File.join config.root, 'lib' - if File.exists?(path) && !$LOAD_PATH.include?(path) + if File.exist?(path) && !$LOAD_PATH.include?(path) $LOAD_PATH.unshift(path) end end diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 7332444ab9..dd0b9c6d70 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -90,7 +90,7 @@ module Rails # Loads and returns the configuration of the database. def database_configuration yaml = paths["config/database"].first - if File.exists?(yaml) + if File.exist?(yaml) require "erb" YAML.load ERB.new(IO.read(yaml)).result elsif ENV['DATABASE_URL'] diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index c8a74e794b..f512aefb23 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -198,7 +198,7 @@ module Rails # Returns all expanded paths but only if they exist in the filesystem. def existent - expanded.select { |f| File.exists?(f) } + expanded.select { |f| File.exist?(f) } end def existent_directories