Ruby Anagrams Checker
You should abstract the code to avoid duplication. Also, use a counter with O(n) performance:

module Enumerable # or require 'facets/enumerable/frequency'
  def frequency
    each_with_object(Hash.new(0)) { |item, counter| counter[item] += 1 }  
  end
end

def anagrams?(s1, s2)
  frequency = proc { |s| s.gsub(/\s+/, "").downcase.chars.frequency }
  frequency.(s1) == frequency.(s2)
end

if ARGV.size != 2
  $stderr.puts("Need two words")
  exit(1)
elsif anagrams?(*ARGV)
  puts("Anagrams")
else
  puts("Not anagrams")
end