[Rubygems-developers] Building binary gems
Daniel.Berger at qwest.com
Wed Mar 7 12:46:23 EST 2007
Patrick Hurley wrote:
> On 3/7/07, Daniel Berger <Daniel.Berger at qwest.com> wrote:
>> Patrick Hurley wrote:
>>> Is there an easy (read automated) way to take an installed gem (that
>>> required binary compilation) from a development/build machine and
>>> create a binary gem to install on a different machine?
>> Based on what I'm reading at http://docs.rubygems.org/read/chapter/6
>> (which is really chapter 8, but nevermind) you should be able to run
>> gem_server on the dev machine, and then point your remote installs at
>> that machine.
> For me that seems to serve the gems out of the gems cache directory,
> which does not include any locally built binary bits.
Hm, I think you would have to modify the gemspec itself to include the
binary files. It would be a pain to recreate the gems (and modify them
in such a way that they don't try to build from source), but you would
only have to do it once per gem, on the dev server.
Otherwise, I think you're relegated to remote copying/ftp'ing/whatever
via a separate script.
I'm not sure how this could be built into rubygems itself, though. I
mean, if the binaries aren't added to the list of files in the gemspec
initially, how would a gem install know, via whatever command line
option, that it's supposed to grab the binary?
For some of the Win32Utils packages I have two separate gems, one that's
prebuilt and includes the binaries, and one that requires that you build
from source. If there's a better way I'm all ears.
More information about the Rubygems-developers