[Rubygems-developers] Fwd: rubygems user install of extensions
Dimitri Aivaliotis
aglarond at gmail.com
Thu Sep 28 02:48:45 EDT 2006
Sorry for the cross-post, but I didn't get any response on ruby-talk.
- Dimitri
---------- Forwarded message ----------
From: Dimitri Aivaliotis <aglarond at gmail.com>
Date: Sep 25, 2006 4:44 PM
Subject: rubygems user install of extensions
To: ruby-talk ML <ruby-talk at ruby-lang.org>
Hello,
My problem is that I am trying to run a gems installation as a non-root
user, and this doesn't work out-of-the-box for any gems that include the
building of extensions with mkmf. For each gem (example: mongrel), I need
to add the following lines to extconf.rb:
require 'etc'
user = ENV['USER']
group = Etc.getpwnam(user).gid
module Config
MAKEFILE_CONFIG["INSTALL"] = "/usr/bin/install -c -o #{user} -g #{group}"
end
and regenerate the gem.
I was wondering if anyone else ran into a similar problem when installing a
gem that included extensions? Do you have other solutions? Is there any
way of specifying MAKEFILE_CONFIG["INSTALL"] in .gemrc, for example?
This happens with both 0.8.11 and svn trunk of rubygems (I applied Tilman
Sauerbeck's patch from
http://rubyforge.org/pipermail/rubygems-developers/2006-July/002056.html
, to solve an unrelated problem).
(This is obviously on UNIX, FreeBSD in my case; I don't know if something
similar would have to be done for Windows.)
Thanks for taking the time.
- Dimitri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20060928/0f086912/attachment.html
More information about the Rubygems-developers
mailing list