From: "Ara.T.Howard" Date: 2005-10-27T05:50:53+09:00 Subject: Re: gem - install to different bindir? On Thu, 27 Oct 2005, Jeremy Kemper wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Oct 26, 2005, at 1:21 PM, Ara.T.Howard wrote: >> i have the following setup >> >> /usr/local/ruby-1.8.0 >> /usr/local/ruby-1.8.3 >> /usr/local/ruby-1.9.0 >> >> /usr/local/bin/ruby180 -> /usr/local/ruby-1.8.0/bin/ruby >> /usr/local/bin/ruby183 -> /usr/local/ruby-1.8.3/bin/ruby >> /usr/local/bin/ruby190 -> /usr/local/ruby-1.9.0/bin/ruby >> /usr/local/bin/ruby -> /usr/local/ruby-1.9.0/bin/ruby >> >> >> only /usr/local/bin is in my path. say i want to install rake. >> >> gem install rake >> >> the lib files obviously go into >> >> /usr/local/ruby-1.9.0/lib/ >> >> but i want the bin files to land here >> >> /usr/local/bin/rake >> >> i see the --install-dir option, how does one specify separate lib and bin >> directories with gem installs? > > I have a similar multi-versioned Ruby install. I move the gem-installed > binfiles by hand and rename them according the Ruby version they expect: > e.g., gem19, rake18-cvs. It would be wonderful if RubyGems could reuse the > details I already fed to ruby ./configure. an even simpler solution might be require 'pathname' bindir = Pathname::new($0).dirname so, in the case of a link like /usr/local/bin/ruby18 -> /usr/local/bin/ruby-1.8.1/bin/ruby this would resolve to /usr/local/bin it seems that getting bindir info from rbconfig is simply not correct - after all, that was the bindir info for ruby - not the code one is currently installing. a more generic option might be a way to clobber Config::CONFIG values. something like --config bindir=/usr/local/bin/ -c bindir=/usr/local/bin or just take any key value paris on the command line like bindir=/usr/local/bin which would, in turn, do Config::CONFIG['bindir'] = '/usr/local/bin' so - go ahead and support command line munging of rbconfig if it's taken to be the master. i could easily work up a patch if people are interested? -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | anything that contradicts experience and logic should be abandoned. | -- h.h. the 14th dalai lama ===============================================================================