Add rubygems version to Gemfile

I have the following error when some of my colleagues script / server after installing the package in rails 2.3.8. I solve this by setting the rubygems version to 1.5.3. But for some of my colleagues, this is rather cumbersome, I’m thinking about putting the rubygems version in the Gemfile. Is it possible?

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. 
+4
source share
2 answers

No, you can’t. However, gem pristine --all can get rid of these warnings.

+3
source

I'm sure this will be completely disproved, but as a temporary fix, I found that you can suppress warnings with Rubygems by adding to /config/preinitializer.rb:

require "rubygems" Gem :: Deprecate.skip = true

Pretty sure it misses ALL fatigue warnings, although obviously this is not a fix, but at least it will help keep your sanity in check;)

+1
source

All Articles