I've run gem install rails -v 4.1.0 on my server, but somehow it's stuck with
Parsing documentation for rails-4.1.0
Installing ri documentation for rails-4.1.0
Can I abort this? What do I need the ri documentation for? Is it really required?
Though the documentation isn't necessary for rails to run; I have found that it is most likely not stuck.
It took a little over five minutes to complete gem install rails -v 4.1.0 on my quad-core i7, but your experience might be worse if you have a slower computer (it took 15m 47s for just ri and an additional 16m 21s for RDoc on my 4 logical core i5). For those who want to make use of the ri and RDocs you will merely have to wait. For those who have no intent to ever use them you can execute
gem install rails -v 4.1.0 --no-ri --no-rdoc
This took ~30s on my i5 machine.
You can abort it using crtl+c
You can use gem install rails --no-document to install Rails without the documentation
It depends as per your use, but you can get rid of this ri documentations use this command
gem install rails --no-ri --no-rdoc
I had the same issue with Rails 4.2.5. I just used Ctrl+C, and then ran gem install rails again, and it said done.
Related
I want to read documentation of gems in terminal. How can I do this with ri tools?
LinuxMint 18.3
Rails 5.1.4
First, make sure you have the Docs on your system. They do not always install with a typical Rails installation.
You can download the doc for a specific gem with
gem rdoc [gem-name] --no-rdoc
The --no-rdoc tells it not to install the HTML version.
If you want the docs for all gems you have installed, you can use
gem rdoc --all --ri --no-rdoc
That may take a few minutes to download.
Once you have the docs downloaded, you can access them with
ri -i
This will give you an interactive prompt where you can search for gems or methods. You can even use tab to autocomplete.
OSX Mavericks, trying to upgrade from Rails 4.0.4 to either 4.1.0.beta1 or 4.1.0.rc2 with ruby version ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0].
In both instances (beta1 and rc1 builds), Terminal gets stuck at Installing ri documentation for rails-4.1.0.rc2
and I have to quit the process (command + > ).
Any suggestions?
This has happened to me a few times. I believe it is a known issue which has never been resolved properly.
Simply install the gem without the documentation, if you don't mind, like the other answer suggests.
gem install rails --no-ri --no-rdoc
UPDATE (2020-04-29)
The new way of generating no documentation is adding the --no-document (in short -N) option, like so:
gem install rails --no-document # or -N in short
Are you sure it's stuck? The documentation takes ages to install (upwards of 4 mins even on a high end MBPr). You could also install the rails gem without documentation using:
gem install --no-ri --no-rdoc rails
Parsing documentation for bundler-1.3.2
Installing ri documentation for bundler-1.3.2
Parsing documentation for rails-3.2.12
Installing ri documentation for rails-3.2.12
Done installing documentation for i18n, multi_json, activesupport, builder, activemodel, rack, rack-cache, rack-test, journey, hike, tilt, sprockets, erubis, actionpack, arel, tzinfo, activerecord, activeresource, mime-types, polyglot, treetop, mail, actionmailer, rack-ssl, thor, rdoc, railties, bundler, rails (58 sec).
29 gems installed
204-252:~ narendra$ rails -v
Rails 2.3.8
204-252:~ narendra$ gem update rails
Updating installed gems**strong text**
Nothing to update
If you're using rbenv you can try running rbenv rehash after updating rails.
If you're in a rails project folder that was built with Rails 2.3.8 then when you run rails -v in that folder it will return that version of rails instead of the latest one. So you could try moving to another folder and see if running rails -v gives you the version you're expecting.
Also, if you installed rails with sudo gem install rails sometimes /usr/bin/rails still points to the old version, so you could update that to point to the new one.
Since rails 3.2.12 is not included in the output of gem list, I suspect you installed the gem with sudo. Installing with sudo and then trying to list the gems without it (or other operations) can give you a different list. Try doing sudo gem list, and if rails 3.2.12 is in there, thats your problem. Try installing it without sudo.
I'm trying to install rails for the 1st time.
I can't seem to get it to install beyond Rails 2.2.3.
I have followed the instructions at:
http://rubyonrails.org/download
I downloaded the latest RubyGems and ran 'ruby setup.rb'.
$ gem -v
1.8.11
I ran 'gem install rails' and got Rails 2.2.3.
I ran 'gem update' several times and I get:
$ gem update
Updating installed gems
Updating rails
Successfully installed rails-2.2.3
Gems updated: rails
Installing ri documentation for rails-2.2.3...
Installing RDoc documentation for rails-2.2.3...
I tried gem1.8:
$ gem1.8 update
Updating installed gems
Updating rails
Successfully installed rails-2.2.3
Gems updated: rails
Installing ri documentation for rails-2.2.3...
Installing RDoc documentation for rails-2.2.3...
$ rails -v
Rails 2.2.3
$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]
I'm using Debian 'unstable' (Wheezy/Sid).
I'm new to rails and don't understand what I'm doing wrong.
I've searched by so far nothing specific to this issue.
I thought the latsted gem would just get Rails 3.1
just as the install docs at the site say?
Any advise much appreciated.
Have you tried this ?
gem install rails --pre
I tried again and it worked fine now.
This time I pointed direct to the
fresh new copy of gem.
All good. Cheers!
Hopefully this is an easy one - I'm trying to install rails on my netbook. I can#'t seem to get it to update to rails 3 (seems stuck on 2.3.5). Here's some terminal output to show you what I mean...
mike#Ubuntu-Netbook:~$ rails -v
Rails 2.3.5
mike#Ubuntu-Netbook:~$ gem update rails
Updating installed gems
Nothing to update
mike#Ubuntu-Netbook:~$ sudo gem install rails
[sudo] password for mike:
Successfully installed rails-3.1.0
1 gem installed
Installing ri documentation for rails-3.1.0...
file 'lib' not found
Installing RDoc documentation for rails-3.1.0...
file 'lib' not found
mike#Ubuntu-Netbook:~$ rails -v
Rails 2.3.5
See? Stuck at 2.3.5! I have done a whole bunch of rails installs on other machines and never had this problem before - what am I missing?
The 2.3.5 install is completely working.
EDIT: I did not get an answer to this question. I got around it by investigating rvm and installing that way instead.
Are you using bundler? Are you in an rvm gemset?
If you're using the latter, once you sudo, you're in a different user's rvm install, so installation won't be the same. If you're using bundler and have locked rails to 2.3.5, that's what it'll be regardless whether you run gem update or not.
If you can answer the above two questions, we can probably narrow down your issue.