I bought the Ola Bini’s eBook on JRuby and started to work through the examples. The installation of the Mongrel gem in JRuby (trunk revision 5341 fails with the following error code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
    $ jruby -S gem install -y mongrel>
    INFO:  `gem install -y` is now default and will be removed>
    INFO:  use --ignore-dependencies to install only the gems you list>
    Building native extensions.  This could take a while...>
    extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)>
    ERROR:  Error installing mongrel:>
    	ERROR: Failed to build gem native extension.[/sourcecode]>
    This error is logged in JIRA with id JRUBY-1771Workaround (possibly applicable for other gems is to explicitly specify the plaform:>
    [sourcecode language='ruby']>
    $ jruby -S gem install -y mongrel --platform jruby>
    INFO:  `gem install -y` is now default and will be removed>
    INFO:  use --ignore-dependencies to install only the gems you list>
    Successfully installed mongrel-1.1.2>
    1 gem installed>
    Installing ri documentation for mongrel-1.1.2...>
    Installing RDoc documentation for mongrel-1.1.2...