[Rubygems-developers] Gem location and site arch directory
luislavena at gmail.com
Mon Feb 2 05:34:46 EST 2009
On Tue, Jan 27, 2009 at 3:06 PM, Luis Lavena <luislavena at gmail.com> wrote:
> On Tue, Jan 27, 2009 at 1:50 PM, Berger, Daniel <Daniel.Berger at qwest.com> wrote:
>> What do people think about RF Bug #14943.
>> If I read it correctly, C extensions should be installed as "lib/i386-msvcr80/foo.so" instead of "lib/foo.so" (on Windows/VC8, for example).
> I believe it should be Gem::Platform.new(RUBY_PLATFORM).to_s or
> Gem::Platform.local to match the gem filename signature, platform and
> folder structure (is x86 instead of i386).
>> It seems reasonable to me, but I wanted to see what other people thought, and if there were any pitfalls to watch out for (beyond needing to modify the search path).
> I just commented on the Ticket, I kind of like it.
> This will workaround the issues I'm having with rake-compiler for copy
> of binary .so file before packaging a new gem.
> Right now I don't see a problem in the long run with the proposed
> solution (or a backward issue neither).
> This should be affecting the $LOAD_PATH during Gem::activate, correct?
> (I'm not up to speed with RubyGems internals).
> Thank you Dan for bumping this.
Been thinking on that and playing (hacking) with this.
I found a problem with this.
As we said, we put the extension inside lib/architecture/ext.so, in
that way rubygems adds the path for the specific gem.
Now while this works for gems, will not work for you in development:
The 'require' over there will not work for me doing "ruby -Ilib", so
that render my specs or tests useless, since I need to add all the
platform machinery in.
Thoughts? This iwll be the first drawback.
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
More information about the Rubygems-developers