Brandon Simmons escreveu isso aĆ: > I'm sorry, it actually seems like I'm not getting shims set up even > when I install the passenger gem as root and then run 'rehash': > > $ ls ~/.rbenv/versions/1.8.7-debian/bin > erb gem irb rdoc ri ruby testrb > $ ls ~/.rbenv/shims > erb gem irb rdoc ri ruby testrb > > looks like the passenger binaries ended up in /usr/local/bin. That > doesn't seem right, since if I gem install passenger in ruby 1.9 that > binary will be clobbered, right?
Right. That's a limitation of having a system-wide rubygems installing binaries in the $PATH. There's even an open bug about that (#637914) > All of the shims that were set up for me are in /usr/bin The problem you are reporting is a limitation in rbenv-alternatives, I think. rbenv expects the gem binaries to be installed in ~/.rbenv/versions/${version}/bin, and that's what happens when you use rbenv with Ruby versions compiled by hand with --prefix=$HOME/.rbenv/version/${version}, but not when you use a system-installed ruby whose binaries were only symlinked into ~/.rbenv/versions/${version}/bin One solution for that would be to make rbenv-alternatives create a `gem` script in ~/.rbenv/versions/${version}/bin that overrides GEM_HOME and calls the actual gem binary, instead of just creating a symlink. For now, you can workaround this doing what I do, which is using `gem install --user-install` plus something like this on my .bashrc: eval "$(rbenv init -)" # [...] if which ruby >/dev/null && which gem >/dev/null; then PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH" fi -- Antonio Terceiro <terce...@debian.org>
signature.asc
Description: Digital signature