From: Eric Hodel Date: 2012-09-08T03:00:08+09:00 Subject: Re: How to patch ruby's gem before an install ? On Sep 7, 2012, at 10:21 AM, Bartosz DziewoƄski wrote: > 2012/9/7 David Unric : >> 4. ??? how to rebuild a gem from modified sources ? I cann't find the >> original gemspec. > > Doesn't `gem build` work for you? gem unpack --spec Will retrieve the original gem spec from the gem. If you've added new files you will need to update the gemspec. Move this file into the unpacked gem directory then run `gem build` >> 5. ??? install modified gem with gem install ./gosu-0.7.45.gem > > `gem install gosu --local`. > > > Also, .gem files are just ZIP archives, you can unpack them with any > archiver and modify the contents. .gem files are tar files which contain (at least) a gzipped YAML file (metadata.gz, the gem spec) and a data.tar.gz (A gzipped tar file). Tools that only handle zip will not unpack them.