<p>I am running Ruby and MySQL on a Windows box.</p>

<p>I have some Ruby code that needs to connect to a MySQL database a perform a select. To connect to the database I need to provide the password among other things. </p>

<p>The Ruby code can display a prompt requesting the password, the user types in the password and hits the Enter key. What I need is for the password, as it is typed, to be displayed as a line of asterisks.</p>

<p>How can I get Ruby to display the typed password as a line of asterisks in the 'dos box'?</p>

Poor man's solution:
```
```
system "stty -echo"
# read password
system "stty echo"
```
```
Or using
http://raa.ruby-lang.org/project/ruby-password/
The target audience for this library is system administrators who need to write Ruby programs that prompt for, generate, verify and encrypt passwords.
Edit:
Whoops I failed to notice that you need this for Windows :(