Error message on "Sorting the Hash" exercise


#1



https://www.codecademy.com/courses/ruby-beginner-en-693PD/0/6?curriculum_id=5059f8619189a5000201fbcb#


I've been reading the previous questions on this exercise and my code seems to be the same as some of the answers that are provided in the discussion. However, I'm still receiving the error message: undefined local variable or method `frequences' for #

Could anyone please advise on this issue?

puts "Enter text here:"
text=gets.chomp
words=text.split
frequencies=Hash.new(0)
words.each do |word|
    frequencies[word] +=1
end
frequencies=frequences.sort_by {|word,count| count}
frequencies.reverse!


#2

@vilena.sab

Have a close look at

frequences

frequencies


#3

My goodness. I just need to spellcheck. Thank you :slight_smile:


#4

@vilena.sab
AND
read the Oops-message more carefully.....!!!!