1
votes

I'm just starting to learn ruby/rails and I have followed the instructions to install ruby on OSX lion from pragmaticstudio.com

I have now got ruby 1.9.2 and 1.9.3 installed on my MacBook. However when I try and generate the documentation using:

sudo rvm docs generate

I get the error:

ERROR: Currently 'rvm docs ...' does not work with non-rvm rubies.

Has anyone else seen this, is there something obvious that I'm missing?

The actual steps I took to install ruby was:

  1. sudo rvm install 1.9.3
  2. sudo rvm use 1.9.3
  3. sudo ruby -v prints ruby 1.9.3dev (2011-07-31 revision 32789) [x86_64-darwin11.2.0]
  4. ruby -v prints ruby 1.9.3dev (2011-07-31 revision 32789) [x86_64-darwin11.2.0]
  5. sudo rvm --default 1.9.3
  6. Then I try and run "sudo rvm docs generate" but I get the error about non-rvm ruby

Thanks Alan.

6

6 Answers

5
votes

I've come across the same error when running 'rvm docs generate-ri' without using sudo. This installation was done by following the steps on Ruby On Rails Tutorial Book for Mac OS X. For me it was resolved by setting the default ruby version for rvm.

steps:

  1. 'rvm list' to get installed ruby version

  2. 'rvm alias create default ruby-2.0.0' (or whatever version you are using)

  3. rerun 'rvm docs generate-ri'

Hope this helps.

3
votes

You are using sudo for running rvm, is system the default Ruby for the root account? Sounds like that's your problem.

0
votes

It seems that you have installed rvm and ruby environment as non-root user. Try to use rvm docs generate without sudo.

0
votes

RVm does not handle non rvm controlled rubies. Its responsibilities is to rubies it installs. We can not mess with the system rubies or rubies that you install outside of package managers. We aren't willing to be responsible for rubies which we do not control, to include building docs for them since that means we have to be responsible for where it places the files it creates OF the docs, and then later on be responsible for cleaning them out.

If you wish to have a ruby's documentation installed, please install that ruby under RVM, and then use rvm docs generate or rvm x.x.x do rvm docs generate where x.x.x is the ruby you wish to build the docs for.

0
votes

How about this?

$ sudo -E rvm docs generate
0
votes

I don't assist with outside tutorials. They are responsible for keeping them up to date, not us. I will tell you that you should install following the directions from our homepage at rvm.io - That being said, rvm reinstall 1.9.2 && rvm docs generate - The sources for the specific ruby you installed have to be extracted in $rvm_path/src/ for docs generate to work on.