I am new to ruby. I need to receive password as an input through gets command.
gets
How do I hide the password input typed in the terminal, during gets
require 'io/console' password = STDIN.noecho(&:gets).chomp
For 1.9.3 (and above), this requires you adding require 'io/console' to your code.
require 'io/console'
Ruby "Password" is another alternative.