2

Is it just me or did RVM once install symlinks in /usr/local/rvm/bin for the current Ruby and Gem commands?

This seems to have gone away in a recent RVM update.

Now all my scripts that use /usr/local/rvm/bin/ruby are failing.

How do I get the symlink feature back?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
spierepf
  • 2,774
  • 2
  • 30
  • 52
  • Add whatever symlinks you want? `ln -s $TARGET $SRC`. – Elliott Frisch Dec 23 '13 at 17:03
  • I was hoping that RVM would manage those symlinks. – spierepf Dec 23 '13 at 17:11
  • For a standard user-install for RVM in ~/.rvm, which it installs Rubies in a sandbox, RVM will NEVER create links in /usr/bin or /usr/local/bin. It has no need to since it's sitting in the path ahead of those directories, so it'd redirect requests for the user. It *should* behave the same way for the root-installed versions also, so a soft-link in either directory wouldn't be needed either. – the Tin Man Dec 23 '13 at 17:15
  • Put a different way, there are no needs for symlinks in /usr/bin/ or /usr/local/bin, because RVM (and rbenv) by their nature remove the need for symlinks. Set them up correctly and don't worry about it. If you're needing to use symlinks you're going against the flow, and there are more effective ways of accomplishing the same thing. – the Tin Man Dec 23 '13 at 17:17
  • The symlinks were in /usr/local/rvm/bin; not /usr/bin or /usr/local/bin. My scripts relied on them because they run through VMware/VIX which doesn't involve the concept of a path (or a shell for that matter). – spierepf Dec 23 '13 at 17:22
  • It sounds like you weren't using a single-user installation then as RVM won't touch shared resources like that for single users. You should ask on the RVM-talk IRC channel (#rvm on irc.freenode.net) or via email to their tech support. – the Tin Man Dec 23 '13 at 23:11

2 Answers2

2

RVM 1.25 disables default pollution of rvm_path/bin, you still can generate the links using:

rvm wrapper ruby-name           # or for default:
rvm wrapper default --no-prefix

Source: https://github.com/wayneeseguin/rvm/issues/2456

Leor
  • 1,252
  • 11
  • 12
0

Unfortunately, looks like Leor's answer no longer works, but you could do it manually. First of all ensure that which ruby points to the rvm dir and then

sudo ln -sf "$(which ruby)" /usr/local/bin/ruby
dimid
  • 7,285
  • 1
  • 46
  • 85