diff --git a/lib/helpers/gocd_helpers.rb b/lib/helpers/gocd_helpers.rb index 22d1e9c8a7..d581599857 100644 --- a/lib/helpers/gocd_helpers.rb +++ b/lib/helpers/gocd_helpers.rb @@ -112,7 +112,7 @@ def twitter_card_image(image) else File.join(app.config[:source], asset_path(:images, path_to_image, :relative => false)) end - raise "Image does not exist or too large to use for Twitter summary: #{full_path_of_image}" unless (File.exists?(full_path_of_image) && (File.size(full_path_of_image) < (1024 * 1024 * 1024))) + raise "Image does not exist or too large to use for Twitter summary: #{full_path_of_image}" unless (File.exist?(full_path_of_image) && (File.size(full_path_of_image) < (1024 * 1024 * 1024))) URI::join(config.base_url, asset_path(:images, path_to_image, :relative => false)) end