ruby ri install and remove

This artical assums that you'v installed ruby by RVM. ( And it is recommended to use RVM)

 The ruby api is not installed by default for RVM installing ruby


Install : rvm docs generate-ri ( It will install the ruby api doc for ri,  and the path is".rvm/rubies/xxx/share/ri/1.9.1/site" | "xx" refers to your default ruby version  ref:https://rvm.io/rubies/docs/) 

remove: just delete all the files under the "site" fold


Perhaps you don't want to add gems-doc to ri, you can turn it off by adding the following to your "~/.gemrc" file:

gem: --no-ri --no-rdoc


if there are already some gem-doc be added into ri, you can remove them by deleing  files under these folds:

"~/.rvm/gems/xx/doc" | "xx" refers to your gems (perhaps there are several ones)






你可能感兴趣的:(ruby ri install and remove)