rubygems/rubygems — Issue #210: Load binary extensions from separate path
Author: voxik
Created: 2011-11-03 16:01:23+00:00
State: open

Hello,

During preparation of Ruby 1.9.3 for F17, I am trying to make sure that Ruby, including RubyGems are going to obey FHS [1]. For RubyGems, it means that they should reside in /usr/share folder, since they are typically platform independent.

Nevertheless, there are also gems with binary extensions. Binary files should be place in /usr/lib{64} and for a long time, there was policy in Fedora to place the binary libraries into ruby_sitearch dir [2]. However, this has the disadvantage, that the files may collide between individual versions of gem.

So in attempt to solve this issue, I've come with first approximation patch [3], which proposes new "exts" folder in the gem directory structure, on the same level as "gems" directory and following the same structure. Once the gem is activated, in the case that the gem has binary extensions, the binary extension is pushed into the $LOAD_PATH as well as the original gem files location.

I said first approximation, because the ultimate goal for me is to load the platform independent part of gems from /usr/share folder where as the binary extensions should be loaded from /usr/lib{64}. Please, do you think that this approach is feasible? Would you accept such patch? Or do you have some other suggestions or plans in such direction?

[1] http://www.pathname.com/fhs/pub/fhs-2.3.html
[2] https://fedoraproject.org/wiki/Packaging:Ruby#Ruby_packages_with_binary_content.2Fshared_libraries
[3] https://gist.github.com/1336824