Rails rdoc Gem error/corruption issue

I'm getting the below error message when creating a new rails app.

Bundler::GemspecError: Could not read gem at /Users/xyz/.rvm/gems/ruby-2.1.1/cache/rdoc-4.2.0.gem. It >may be corrupted. An error occurred while installing rdoc (4.2.0), and Bundler cannot continue. Make sure that gem install rdoc -v '4.2.0' succeeds before bundling.

I am on Ruby 2.1.1 and Rails 4.1.6. I have tried:

gem install rdoc -v '4.2.0'; no change.
gem install rdoc; no change.
gem install rails; no change.
gem install rails --no-ri --no-rdoc; no change.
gem uninstall rails; elect to uninstall all versions.
gem install rails; hangs for a long time on 'installing ri documentation'.
gem uninstall rails; removes the hald installed 4.1.8 vers installed in last cmd.
gem install rails --no-ri --no-rdoc; installs without issue.
rails new new_app_name; exactly the same rdoc error issue even though I specified an install without rdoc!!

Bundler::GemspecError: Could not read gem at /Users/jamesbkemp/.rvm/gems/ruby-2.1.1/cache/rdoc->4.2.0.gem. It may be corrupted. An error occurred while installing rdoc (4.2.0), and Bundler cannot continue. Make sure that gem install rdoc -v '4.2.0' succeeds before bundling.

I seem to be stuck on this error, bundle install or update isn't doing anything to help either. Can anyone help?

Just removed the two sited instances of 'gem rdoc' from gemfile.lock, still the same issue.


FYI - Seemed to be an issues with Bundler. Removed bundler and reinstalled and all seemingly ok.


I encountered the problem today and resolved the issue by deleting " rdoc->4.2.0.gem " from the cache folder and after that all you have to do is open command prompt and type gem install rdoc -v '4.2.0' and press enter , it will show a warning that

do you want to overwrite the executable file in bin folder (Y/N).

Type Y and press enter and you are ready for the ride.

链接地址: http://www.djcxy.com/p/35934.html

上一篇: 红宝石在轨道上

下一篇: Rails rdoc Gem错误/腐败问题