hmans / rbfu

Minimal Ruby version management is minimal.
MIT License
118 stars 10 forks source link

rbfu does not add ~/.gem/$ruby/$ver/bin to the PATH #18

Closed postmodern closed 12 years ago

postmodern commented 12 years ago

rbfu does not add ~/.gem/$ruby/$version/bin to the PATH variable, resulting in warnings from the gem command and not being able to access any installed executes.

hmans commented 12 years ago

See #17 -- managing ~/.gem/ is currently not in the scope of rbfu. For now, please look into modifying your ~/.gemrc or modifying GEM_HOME and GEM_PATH in your own startup scripts.

postmodern commented 12 years ago

Modifying my ~/.gemrc won't work, because I need per-ruby separation of installed gems, especially C extensions. I was hoping rbfu would properly set GEM_HOME (like it is advertised) or GEM_PATH. Until rbfu allows normal users to use a system-installed Ruby and install gems into their home-directory, I cannot use rbfu.

At the bare minimum you should add ~/.gem/$ruby/{1.8,1.9}/bin to $PATH, since this is what rubygems 1.8.24 expects.

hmans commented 12 years ago

I'm happy to improve the rbfu experience for you, but I'm still thinking that the cause of the problem stems from making the system-level Ruby appear as a user-level Ruby installation. rbfu-env @system should leave you with an untouched environment that should allow you to use the system-level Ruby as intended by your OS distribution.

Or, in other words: if you're using the system-level Ruby, why are you using rbfu?

I'm simply trying to understand this issue.

postmodern commented 12 years ago

The bug occurred when I switched to Ruby 1.8.7 and attempted to install a gem as a normal user. This also occurred when I switched to JRuby and repeated trying to install a gem.