Terminal stuck on installing ri documentation for rails
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
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