put rubygems version in Gemfile
I have the following error when some of my colleag开发者_JS百科ues script/server after bundle install in rails 2.3.8. I solve it by set the version of rubygems to 1.5.3. But It is kinda cumbersome for some of my colleagues , I am thinking of putting rubygems version into 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.
No you can't. However, gem pristine --all
may get rid of those warnings.
I'm sure this'll be completely frowned upon but as a temporary fix I found you can suppress the warnings using Rubygems if you add the following to /config/preinitializer.rb :
require "rubygems" Gem::Deprecate.skip = true
Pretty sure this skips ALL deprecation warnings though so obviously not a fix but it'll at least help keep your sanity in check ;)
精彩评论