Add check for Rails.application