From: Jon Forums Date: 2012-11-25T11:44:22+09:00 Subject: Re: How to create a gem which conditionally compiles/installs a C extension? > * Figure out some way in the gem to dynamically disable compiling the > extension on MRI 1.9.3. For example in ext/extconf.rb: > > if '1.9.2' == RUBY_VERSION > create_makefile(...) > else > ??? > end `Gem::Ext::ExtConfBuilder` makes this difficult by (incorrectly) assuming it should always run make after extconf.rb; you must create a Makefile (even if it's just a no-op stub) and have an activated make on your system. I recently had a similar idea (comined pure-ruby and native gem with build decision made at install time by extconf.rb) and briefly toyed with wrapping the extconf.rb with a Rakefile. The quick hack didn't work, and I haven't had time to swing back and dance with the little monster. https://github.com/jonforums/ffi-bogus Perhaps it just needs another set of eyes and a bit more time. That said, a Rakefile + extconf.rb solution is a kludge. The right solution is to find a clever way to make RubyGems more nimble and not break existing extconf.rb builds. Jon -- Posted via http://www.ruby-forum.com/.