On 11/13/10 02:38, Jeremy Evans wrote:
This (probably mangled by GMail) patch appears to work around the
issue. Looking at the ruby-gems code, I'm not sure there's a clean
fix. Please give this a shot and report whether or not it works for
you. I still plan on talking to the ruby-gems maintainer to see if I
can get him to fix the bug in the next ruby-gems release.
As far as I can tell, ruby-gems checks whether or not the directory is
writeable. The directory in this case is either the default directory
or the --install-dir option. So even if you use the --user-install
flag, it'll copy the gem to the default directory (in addition to
copying it to the user install directory). GEM_HOME works around this
by changing the default directory. The reason this doesn't break when
run as a regular user is that a regular user doesn't have write access
to the default directory.
What I still don't understand is why this only affects certain gems,
instead of all gems.
Jeremy
Index: ruby.port.mk
===================================================================
RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v
retrieving revision 1.33
diff -u -p -r1.33 ruby.port.mk
--- ruby.port.mk 8 Nov 2010 23:20:43 -0000 1.33
+++ ruby.port.mk 13 Nov 2010 07:26:39 -0000
@@ -296,8 +296,8 @@ do-build:
pax -wz -s '/^\.\///' -f ${_GEM_DATAFILE}
cd ${_GEM_CONTENT}&& tar -cf ${WRKDIR}/${_GEM_PATCHED} *.gz
mkdir -p ${GEM_BASE}
- env -i ${MAKE_ENV} HOME=${GEM_BASE}/.. ${GEM} install \
- ${GEM_FLAGS} ${WRKDIR}/${_GEM_PATCHED}
+ env -i ${MAKE_ENV} HOME=${GEM_BASE}/.. GEM_HOME=${GEM_BASE} \
+ ${GEM} install ${GEM_FLAGS} ${WRKDIR}/${_GEM_PATCHED}
. endif
# Take the temporary gem directory, install the binary stub files to
Jeremy, this seems to have worked, as I created about 50 more
ruby packages. I'm still trying to understand whats different
between gems. But thanks for this!
--STeve Andre'