Uses for Ruby

I am thinking about teaching myself ruby, but i really dont know what its used for.

Could you please explain what it is for.

Where is a good place to learn it. So far I am planning to use Code Academy.