title: how does gem installation works ? how did gem get the installation files?
body: <p>when I wanted to install <a href="http://sass-lang.com/tutorial.html">SASS</a>, I have been told to install ruby on my machine, ok fine.</p>
  
  <p>then all I had to do is to run the following code</p>
  
  <pre><code>gem install sass
  </code></pre>
  
  <p>and now I am done, and I have SASS installed</p>
  
  <p>my question is in general..</p>
  
  <p><strong>How did gem knows what SASS is, and from where did it get it ?</strong></p>
  
  <p><strong>It is a cool thing but I just want to know what happened behind the scenes ?</strong></p>
  
  <p>Thanks</p>