I prefer this because its less code: 

     puts "Please enter the client's name"
      name = gets.chomp

      while app.clients.has_key? name
        puts "This name already exists in the database, enter the clients name again"
        name = gets.chomp
      end