Ruby on rails 将rubygems版本放入Gemfile中

Ruby on rails 将rubygems版本放入Gemfile中,ruby-on-rails,ruby,rubygems,bundler,Ruby On Rails,Ruby,Rubygems,Bundler,当我的一些同事在捆绑包后在rails 2.3.8中安装脚本/服务器时,出现了以下错误。我通过将rubygems的版本设置为1.5.3来解决这个问题。但这对我的一些同事来说有点麻烦,我正在考虑将rubygems版本放到Gemfile中。可能吗 NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from

当我的一些同事在捆绑包后在rails 2.3.8中安装脚本/服务器时,出现了以下错误。我通过将rubygems的版本设置为1.5.3来解决这个问题。但这对我的一些同事来说有点麻烦,我正在考虑将rubygems版本放到Gemfile中。可能吗

NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Users/xxxx/.gem/ruby/1.8/gems/rails-2.3.8/lib/rails/gem_dependency.rb:21.
NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#refresh! called from /Users/xxxx/.gem/ruby/1.8/gems/rails-2.3.8/lib/rails/vendor_gem_source_index.rb:34.
NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#load_gems_in called from /Library/Ruby/Site/1.8/rubygems/source_index.rb:320.
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 /Library/Ruby/Site/1.8/rubygems/source_index.rb:127.
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 /Library/Ruby/Site/1.8/rubygems/source_index.rb:127.
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 /Library/Ruby/Site/1.8/rubygems/source_index.rb:127.
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 /Library/Ruby/Site/1.8/rubygems/source_index.rb:127.
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 /Library/Ruby/Site/1.8/rubygems/source_index.rb:127.
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 /Library/Ruby/Site/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.

不,你不能。但是,
gem pristine——所有的
都可能会消除这些警告。

我确信这会被完全拒绝,但作为一个临时修复,我发现如果您将以下内容添加到/config/preinitializer.rb,您可以使用Rubygems抑制警告:

需要“rubygems” Gem::Deprecate.skip=true


这无疑会跳过所有的弃用警告,虽然显然不是一个解决方案,但至少会帮助您保持理智;)

这个答案对我的警告没有影响。这不是rails 2.3.11的补丁,你知道吗??