简体   繁体   English

我更新了ruby gems,现在我到处都得到解析树错误和弃用警告!

[英]I updated ruby gems, and now i get parse tree errors and deprecation warnings everywhere!

The error in short: 错误简而言之:

NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91.
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/gem_dependency.rb:275:in `==': undefined method `name' for "ParseTree":String (NoMethodError)

using 运用

ruby 1.8.7
rails 2.3.8
rubygems 1.8.5

what do I do? 我该怎么办?

I've tried deleting the rubygems folder, and doing a clean rubygems install... but the above errer remains. 我已经尝试删除rubygems文件夹,并做一个干净的rubygems安装......但上面的错误仍然存​​在。

There have been a lot of structural changes in rubygems that has caught a lot of people by surprise. rubygems中有很多结构上的变化让很多人感到意外。 It has introduced incompatibility problems with a number of common applications and frameworks. 它引入了许多常见应用程序和框架的不兼容问题。

You may need to roll back to a version of rubygems that works with your system, such as 1.6.0: 您可能需要回滚到适用于您的系统的rubygems版本,例如1.6.0:

gem update --system 1.6.0

If that doesn't work, you may want to investigate slimgems which is a 1.3.7 fork of rubygems that is intended to remedy these compatibility issues. 如果这不起作用,您可能需要调查slimgems ,这是一个1.3.7的rubygems分支,旨在解决这些兼容性问题。

it's worthy to try update bundeler 值得尝试更新bundeler

d:\\workspace\\dongxf\\projects\\ruby\\arbref>rails s D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/rubygems_integration.rb:183:in stub_source_index170': uninitialized constant Gem::SourceIndex (NameError) from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/rubygems_integration.rb:303:in stub_rubygems' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/rubygems_integration.rb:246:in replace_entrypoints' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:14:in setup' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:110:in setup' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/setup.rb:7:in ' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in require' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in d:\\ workspace \\ dongxf \\ projects \\ ruby​​ \\ arbref> rails s D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/rubygems_integration.rb: 183:在stub_source_index170': uninitialized constant Gem::SourceIndex (NameError) from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/rubygems_integration.rb:303:in来自D stub_source_index170': uninitialized constant Gem::SourceIndex (NameError) from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/rubygems_integration.rb:303:in stub_rubygems':/ RailsInstaller / Ruby1.9.3 / lib / ruby​​ / gems / 1.9.1 / gems / bundler-1.0.22 / lib / bundler / ruby​​gems_integration.rb:246: replace_entrypoints' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:14:in /Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:14:in setup'来自D:/RailsInstaller/Ruby1.9.3/lib/ ruby / gems / 1.9.1 / gems / bundler-1.0.22 / lib / bundler.rb:110:in setup' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/setup.rb:7:in :in'from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in require' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in require' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in rescue in require' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in require' from d:/workspace/dongxf/projects/ruby/arbref/config/boot.rb:6:in ' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in require' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in require' from script/rails:5:in `' require' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in救援'来自D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in require'from require' from d:/workspace/dongxf/projects/ruby/arbref/config/boot.rb:6:in来自D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in require' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in script / rails:5: require' from D:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in '

d:\\workspace\\dongxf\\projects\\ruby\\arbref>gem update bundle Updating installed gems Updating bundler Fetching: bundler-1.3.2.gem (100%) Successfully installed bundler-1.3.2 Installing ri documentation for bundler-1.3.2 Installing darkfish documentation for bundler-1.3.2 Gems updated: bundler d:\\ workspace \\ dongxf \\ projects \\ ruby​​ \\ arbref> gem update bundle更新已安装的gems更新bundler提取:bundler-1.3.2.gem(100%)已成功安装bundler-1.3.2为bundler-1.3.2安装ri文档安装了更新的bundler-1.3.2 Gems的darkfish文档:bundler

d:\\workspace\\dongxf\\projects\\ruby\\arbref>rails s => Booting Thin d:\\ workspace \\ dongxf \\ projects \\ ruby​​ \\ arbref> rails s =>引导瘦

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM