Ruby $stdin.gets without showing chars on screen
You can use the STDIN.noecho method from the IO/console module:
require 'io/console'
pw = STDIN.noecho(&:gets).chomp
If you're on a system with stty
:
`stty -echo`
print "Password: "
pw = gets.chomp
`stty echo`
puts ""