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
Starting from Ruby version 2.3.0 you can use the IO#getpass method like this:
IO#getpass
require 'io/console' password = STDIN.getpass("Password:")
See the getpass method in the Standard Library Documentation.