0

Ever since installing RVM, my manpages are broken. Current versions of man don't use the MANPATH variable, so why is it being set to .rvm/man and why isn't there a full catalog of manpages inside that folder?

Ashley Raiteri
  • 700
  • 8
  • 17
  • What makes you think that `man` doesn't use MANPATH? If you do `man man` on your Mac, you can see that it definitely *is* used. – Paul Tomblin Jul 19 '12 at 18:35
  • If you don't specify -M but set the MANPATH environment variable, the value of that variable is the list of the directories that man searches. Since OSX 10.2 MANPATH is not generally set, and instead mapages are found based on a canonical directory structure. By setting MANPATH, RVM was disrupting this behavior. – Ashley Raiteri Jul 20 '12 at 19:23
  • So what you mean to say is that OSX doesn't *set* MANPATH. That's a very different thing that saying that `man` doesn't *use* MANPATH. Obviously it uses it, or this bug in rvm wouldn't affect anything. – Paul Tomblin Jul 20 '12 at 19:32

2 Answers2

1

Apparently in the script ~/.rvm/scripts/initialize there is a little block that sets MANPATH and exports. Just comment this block out. Modern manpages compute path dynamically.

The offending lines are:

#  if [[ -z "${MANPATH:-}" ]]
#  then
#    export MANPATH="${rvm_man_path}"
#
#  elif ! [[ ":${MANPATH}:" =~ ":${rvm_man_path}:" ]]
#  then
#    export MANPATH="${MANPATH}:${rvm_man_path}"
#  fi
Ashley Raiteri
  • 700
  • 8
  • 17
0

This was fixed already as @Ashely noted in comment, proper way is to update RVM: rvm get head and to open new terminal / relogin depending on the installation type.

mpapis
  • 52,729
  • 14
  • 121
  • 158