[Rubygems-developers] How to rebuild a gem

Ryan Davis ryand-ruby at zenspider.com
Mon Jan 19 15:44:14 EST 2009

On Jan 19, 2009, at 07:47 , Han Holl wrote:

> I want to install a gem, but it doesn't build on my platform.
> I fix the C-source, and submit a patch to the owner.
> But I want to go on, and not wait for the maintainer to apply my  
> patch.
> How can I rebuild the gem, and install.
> I tried to untar the original gem, untar data.tar.gz, drop in my .c  
> file, and
> tar it up again, but this doesn't work. I get an error message the  
> some
> directory already exists. I rm -rf'ed everything in the gem  
> directory tree
> that belonged to this gem, but still the same error.
> Is there a way to do this ?

generally a blown build just sits there with a build log file so you  
can diagnose the problem. Do a regular install, let it blow up, cd  
into the gem dir, add your files/patches needed, and finish the build  
(make/rake as appropriate, depending on how the gem extension is  
packaged up). It builds in the same location it is going to run from,  
so you should be good.

More information about the Rubygems-developers mailing list