不小心运行了$ gem update --system后,无法运行rails服务器。[英] Can't run rails server after accidentally running $ gem update --system

本文是小编为大家收集整理的关于不小心运行了$ gem update --system后,无法运行rails服务器。的处理方法,想解了不小心运行了$ gem update --system后,无法运行rails服务器。的问题怎么解决?不小心运行了$ gem update --system后,无法运行rails服务器。问题的解决办法?那么可以参考本文帮助大家快速定位并解决问题。

问题描述

我运行 gem update --system 认为它可以解决我遇到的问题,但现在我无法运行 rails server.它不会加载,相反,我不断收到以下内容.谁能告诉我如何撤消此操作并恢复到我运行更新之前?

我已经运行了git checkout,但是问题依旧……

/usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:187:in `stub_source_index170': uninitialized constant Gem::SourceIndex (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:353:in `stub_rubygems'
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:250:in `replace_entrypoints'
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rb:14:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler.rb:107:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.7/lib/rubygems-bundler/noexec.rb:66:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.7/lib/rubygems-bundler/noexec.rb:78:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'

推荐答案

好像最新版的 Rubygems 有问题.

您只需使用以下命令恢复到旧版本,一切都会正常:

gem update --system 1.8.24

本文地址:https://www.itbaoku.cn/post/786471.html