I tried in
Ubuntu 14.04.2 LTS and working fine
Step 1: (the purpose of the first line in designating which interpreter to use for the rest of the file)
#!/usr/bin/env ruby puts "Hello World!"
Step 2: (make the file executable with below command)
chmod u+x hello-world.rb
Please not that If your platform doesn't support the #!/usr/...