title: How do I wrap up a Ruby C extension in a Ruby Gem?
body: <p>I can't find many docs on this. How do I package a gem such that the C extension is compiled when the gem is installed?</p>
  
  <p>In particular I want to do this:</p>
  
  <ul>
  <li><p>on Linux and MacOSX i would like compile the C extension on gem install</p></li>
  <li><p>on Windows I would like to simply install a precompiled .so</p></li>
  </ul>
  
  <p>any help on this, in particular example source, would be very useful :)</p>