Raj pal wrote in post #1104520:
> hi I used your code,
>
> my_hash = {
>   User1=> 'Pass1',
>   User2=> 'Pass2'
> }
>

That's not my code, this is:

my_hash = {
  User1: 'Pass1',
  User2: 'Pass2'
}

This is equivalent to:

my_hash = {
  :User1 => 'Pass1',
  :User2 => 'Pass2'
}

The reason I used #to_s on the username later was because it is a 
symbol, and I used the shortcut notation when creating the hash. The 
values themselves are of course placeholders. You can use whatever 
content is most suitable.

User1 is a constant (a type of variable), and an uninitialised one in 
your case. This is the reason for the error.

Are you sure you're not out of your depth? After all, you're trying to 
do advanced interactions without being able to work out what lines like 
"uninitialized constant User1" mean.
Perhaps you should do some basic tutorials before working on projects 
this complex.

-- 
Posted via http://www.ruby-forum.com/.