title: How do I make "gem install" use an edited source (and not re-download the source first)
body: <p>I'm trying to install a gem, but it fails because of <code>-Werror</code>:</p>
  <pre><code>$ gem install -V thrift -v '0.11.0.0' 
  ...
  binary_protocol_accelerated.c:459:18: error: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro]
    rbuf_ivar_id = rb_intern(&quot;@rbuf&quot;);
                   ^~~~~~~~~~~~~~~~~~
  ...
  </code></pre>
  <p>If I edit <code>$HOME/.rvm/gems/ruby-2.3.8/gems/thrift-0.11.0.0/ext/Makefile</code> and add <code>-Wno-error</code> to <code>CFLAGS</code> (or just delete <code>-Werror</code>) I can build it just fine with <code>make</code>.</p>
  <p>But issuing <code>gem install</code> again will overwrite my changes and fail again.  I have also tried <code>gem install -V thrift -v '0.11.0.0' -- --with-cflags=-Wno-error</code> without success.</p>
  <p>So is there a way for <code>gem</code> to not re-download the sources?  Or an alternative way of passing <code>-Wno-error</code>?</p>