Webrick : windows : Premature end of script headers:

Hi,
I have Ruby34-x64 with Webrick 1.9.1 on windows.
I made a small cgi script below

#!/usr/bin/env ruby
require 'cgi'
print "Content-type: text/plain\n\n"
5.times { |i| puts "Hello world #{i}!"}
puts 'So many worlds there. :('
puts

I associatedf the cgi extension with the ruby interpreter in windows. When I acess the cgi script in the browser I get the error : Premature end of script headers:
Am I missing a required header ?
Thanks,
Regards

This usually means a script error or misconfiguration check your code and server settings.

It means your Ruby script crashed before sending proper HTTP headers Check for errors in your code missing gems or syntax issues.