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
Related
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.
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.
While trying to install Rails 3, I get the following error:
command run: sudo gem install rails --pre
error'd now with:
Successfully installed rails-3.0.0.rc2
1 gem installed
Installing ri documentation for rails-3.0.0.rc2...
File not found: lib
Or if you don't want to worry about running versions side by side you can do
gem update rails
At least it worked for me.
Rails 3 is out of beta/rc now, so try:
gem install rails --version 3.0.0
It should work on Ruby 1.8.7 and 1.9.2-p0.
I haven't personally seen that issue, but you could try and get around it by using the --no-ri option.
sudo gem install rails --pre --no-ri
There's also a --no-rdoc option if you have trouble with that too.
I got a White Macbook and I have to go to a conference in 10 hours but I'm having a lot of problems.
First, I wanted to have Rails 3, so I used MacPorts to install Ruby 1.8.7. It worked well ;)
Then I was thinking I should install Rails 3, but no, no! It says:
$ sudo gem install rails --pre
ERROR: Error installing rails:
activesupport requires Ruby version >= 1.8.7.
What should I do? I already have 1.8.7!
First you need to install RVM, then the latest version of Ruby. Next you'll set that version of Ruby as the default. Finally, you'll install Rails b3.
Install RVM (http://rvm.beginrescueend.com/rvm/install/):
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Install the latest Ruby (http://rvm.beginrescueend.com/rubies/installing/):
rvm install ruby-head
You can check which versions you now have installed with:
rvm list
Set the latest version of Ruby as default (replace 'ruby-1.9.2-head' with desired version):
rvm ruby-1.9.2-head --default
Make sure things are up to day, then install the Rails beta:
gem update --system
gem install rails --pre
You may have to install some gem dependencies before Rails will install.
To easily setup Rails 3 on osx machine the only thing you need to do is follow this brilliant (as always) Railscast, here for the transcription
You can also see comments to check for problems and eventually solutions.
You may have two different versions of Ruby installed. Try "gem env" or "sudo gem env" and see which version of Ruby it says you have.
Remove the older one if you have two installed. If all else fails, upgrade to 1.9.x, I believe it is recommended for Rails 3 anyway.
I would strongly recommend using RVM (Ruby Version Manager) to keep your Rails 3 separate from your Rails 2. (One example of Rails 2 conflicting with Rails 3: when you go to the command line to generate a Rails app, will it generate a Rails 2 app or a Rails 3 app? RVM allows you to keep them separate.)
Also, the latest Ruby 1.8.7 will probably not work with Rails 3, so you have to use an earlier patchlevel (248 works for me). Details are here: http://techiferous.com/2010/02/installing-rails-3-beta-with-rvm-and-ruby-1-8-7/
You should use rvm as others have said to manage multiple installations of Ruby and Ruby gems. (If you go that way, take the time to read rvm's documentation carefully.)
However, you should also get comfortable figuring out what version of Ruby your shell is seeing as the default and why. It sounds to me like your $PATH variable may not be properly updated. The $PATH variable is what determines which Ruby interpreter or gem command is the first seen, if you have more than one installed (as you now do). MacPorts will install new binaries into /opt/local/bin by default, and it should also alter your $PATH so that /opt/local/bin precedes /usr/bin (which is where Apple's out of the box Ruby lives).
I suspect that when you did sudo gem install, you were using /usr/bin/gem (which is the gem installer for /usr/bin/ruby rather than /opt/local/bin/gem (which would be the installer for MacPort's Ruby).
Check the output of echo $PATH, which ruby and which gem to see what's going on.
You should indeed use rvm, but as no one explained to you how to do this without rvm, here you go:
sudo gem install tzinfo builder memcache-client rack rack-test rack-mount \
abstract erubis activesupport mime-types mail text-hyphen text-format \
thor i18n rake bundler arel railties rails --prerelease --force
Based on your question and your responses to some of the answers, it sounds like you're not using the MacPorts version of Ruby. You should make sure that /opt/local/bin is in the front of your $PATH, before /usr/bin. Also, you should install RubyGems via MacPorts (sudo port install rb-rubygems) and make sure you're using the MacPorts gem. Then install Rails using the MacPorts gem.