On Fri, Sep 30, 2011 at 11:06 AM, Thomas de Grivel <[email protected]> wrote: > Hi, > > It seems we cannot install gems with native extensions as a non-root user. > > See this discution for a possible resolution : > https://github.com/carlhuda/bundler/issues/541 > > The resolution discussed in the link above does not work on my machine. > This hack makes it work for me : > > -u /usr/local/lib/ruby/1.8/x86_64-openbsd4.9/rbconfig.rb~ > /usr/local/lib/ruby/1.8/x86_64-openbsd4.9/rbconfig.rb< > --- /usr/local/lib/ruby/1.8/x86_64-openbsd4.9/rbconfig.rb~ Fri Sep 30 > 19:33:50 2011 > +++ /usr/local/lib/ruby/1.8/x86_64-openbsd4.9/rbconfig.rb Fri Sep 30 > 19:33:50 2011 > @@ -11,7 +11,7 @@ > CONFIG = {} > CONFIG["DESTDIR"] = DESTDIR > CONFIG["PATCHLEVEL"] = "330" > - CONFIG["INSTALL"] = '/usr/bin/install -c -o root -g bin' > + CONFIG["INSTALL"] = ENV['RB_USER_INSTALL'] ? '/usr/bin/install -c' : > '/usr/bin/install -c -o root -g bin' > CONFIG["EXEEXT"] = "" > CONFIG["prefix"] = (TOPDIR || DESTDIR + "/usr/local") > CONFIG["ruby_install_name"] = "ruby18" > > > Isn't this supposed to be set by the Ruby installer ?
Both the ruby 1.8 and 1.9 OpenBSD ports have fixes that allow installation of gems with C extensions as a non-root user, as long as you use the --user-install option. Check the patches in devel/ruby-gems and lang/ruby/1.9. Jeremy
