title: Windows (RVM) vs Linux (jruby): how to fix different gem requirements?
body: <p>I suffer incompatible gem requirements when creating a Rails App on Windows (RVM) and deploying them to Linux (jRuby). How can I reconfigure the Rails requirements on the Linux/jRuby side, so I can bundle and run the app?</p>
  
  <p>Since <strong>debug_inspector</strong> only exists on RVM, the gem requirements don't bundle on jRuby. Instead bundler complains: </p>
  
  <blockquote>
    <p>Using debug_inspector 0.0.2</p>
    
    <p>Gem::Ext::BuildError: ERROR: Failed to build gem native extension.</p>
  
  <pre><code>[...]/jruby-1.7.20/bin/jruby -r ./siteconf20150523-28378-1i9zw09.rb extconf.rb
  </code></pre>
    
    <p>[...]/jruby-1.7.20/lib/ruby/shared/mkmf.rb:14:
    Use RbConfig instead of obsolete and deprecated Config. mkmf.rb can't
    find header files for ruby at
    [...]/jruby-1.7.20/lib/native/include/ruby/ruby.h</p>
    
    <p>extconf failed, uncaught signal 1</p>
  </blockquote>
  
  <p>Thanks</p>
  
  <pre><code>#diff Gemfile.lock_rvm Gemfile.lock_jruby
  2c2
  &lt;   remote: http://rubygems.org/
  ---
  &gt;   remote: https://rubygems.org/
  32a33,37
  &gt;     activerecord-jdbc-adapter (1.3.16)
  &gt;       activerecord (&gt;= 2.2)
  &gt;     activerecord-jdbcsqlite3-adapter (1.3.16)
  &gt;       activerecord-jdbc-adapter (~&gt; 1.3.16)
  &gt;       jdbc-sqlite3 (&gt;= 3.7.2, &lt; 3.9)
  40,41d44
  &lt;     binding_of_caller (0.7.2)
  &lt;       debug_inspector (&gt;= 0.0.1)
  43,44d45
  &lt;     byebug (5.0.0)
  &lt;       columnize (= 0.9.0)
  52,53d52
  &lt;     columnize (0.9.0)
  &lt;     debug_inspector (0.0.2)
  59c58
  &lt;     jbuilder (2.2.16)
  ---
  &gt;     jbuilder (2.2.13)
  61a61
  &gt;     jdbc-sqlite3 (3.8.7)
  66c66
  &lt;     json (1.8.2)
  ---
  &gt;     json (1.8.2-java)
  72d71
  &lt;     mini_portile (0.6.2)
  75,76c74,76
  &lt;     nokogiri (1.6.6.2-x86-mingw32)
  &lt;       mini_portile (~&gt; 0.6.0)
  ---
  &gt;     nokogiri (1.6.6.2-java)
  &gt;     puma (2.11.2-java)
  &gt;       rack (&gt;= 1.1, &lt; 2.0)
  107c107
  &lt;     sass (3.4.14)
  ---
  &gt;     sass (3.4.13)
  119c119
  &lt;     sprockets-rails (2.3.1)
  ---
  &gt;     sprockets-rails (2.3.0)
  123c123,125
  &lt;     sqlite3 (1.3.10-x86-mingw32)
  ---
  &gt;     therubyrhino (2.0.4)
  &gt;       therubyrhino_jar (&gt;= 1.7.3)
  &gt;     therubyrhino_jar (1.7.6)
  125c127
  &lt;     thread_safe (0.3.5)
  ---
  &gt;     thread_safe (0.3.5-java)
  136,140d137
  &lt;     web-console (2.1.2)
  &lt;       activemodel (&gt;= 4.0)
  &lt;       binding_of_caller (&gt;= 0.7.2)
  &lt;       railties (&gt;= 4.0)
  &lt;       sprockets-rails (&gt;= 2.0, &lt; 4.0)
  143c140
  &lt;   x86-mingw32
  ---
  &gt;   java
  146c143
  &lt;   byebug
  ---
  &gt;   activerecord-jdbcsqlite3-adapter
  149a147
  &gt;   puma
  153c151
  &lt;   sqlite3
  ---
  &gt;   therubyrhino
  157d154
  &lt;   web-console (~&gt; 2.0)
  </code></pre>