I tried it in Ubuntu 14.04.2 LTS, and it is working fine
Step 1: (the purpose of the first line in designating which interpreter to use for the rest of the file), and save the file as a hello-world.rb
#!/usr/bin/env ruby
puts "Hello World!"
Step 2: (make the file executable with the below command)
chmod u+x...