- Dimitri
---------- Forwarded message ----------
From: Dimitri Aivaliotis < [EMAIL PROTECTED]>
Date: Sep 25, 2006 4:44 PM
Subject: rubygems user install of extensions
To: ruby-talk ML <[EMAIL PROTECTED]>
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
_______________________________________________ Rubygems-developers mailing list [email protected] http://rubyforge.org/mailman/listinfo/rubygems-developers
