Still getting deprecation warnings in Rails3.1
I keep getting depreciation warnings while testing in Rails 3.1 like
RailsProject$ bundle exec autotest
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Users/CS/.rvm/gems/ruby-1.9.2-p290/gems/ZenTest-4.5.0/lib/autotest.rb:226.
NOTE: Gem::SourceIndex#gems is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#gems called from /Users/CS/.rvm/gems/ruby-1.9.2-p290/gems/ZenTest-4.5.0/lib/autotest.rb:226.
loading autotest/rails
/Users/CS/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -I.:lib:test -rubygems -e "%w[test/unit test/unit/rim_test.rb test/unit/page_test.rb test/functional/pages_controller_test.rb test/unit/helpers/pages_helper_test.rb test/unit/order_test.rb test/unit/admin_user_test.rb test/unit/helpers/cart_helper_test.rb test/unit/customer_test.rb test/unit/ordered_service_test.rb test/unit/services_test.rb test/functional/cart_controller_test.rb].each { |f| require f }" | unit_diff -u
/Users/CS/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/rubygems_ext.rb:43: warning: method redefined; discarding old gem_dir
/Users/CS/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1262: warning: previous definition of gem_dir was here
/Users/CS/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/rubygems_ext.rb:154: warning: method redefined; discarding old hash
/Users/CS/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb:125: warning: previous definition of hash was here
/Users/CS/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:183: warning: method redefined; discarding old initialize
/Users/CS/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb:53: warning: previous definition of initialize was here
My versions:
RailsProject$ bundle exec rails -v
Rails 3.1.0
RailsProject$ bundle exec gem -v
1.8.10
RailsProject$ bundle exec bundle -v
Bundler version 1.0.18
I tried all that gem pristine --all --no-extensions
stuff from this post - with and 开发者_高级运维without bundle exec
Every gem is up-to-date.
Does anybody have an idea how to solve that?
The problem is that you're not using the latest version of ZenTest. You're using 4.5.0 and the latest is 4.6.2.
Try running
gem update ZenTest
gem update autotest
and you might need to update your Gemfile in your rails app and run bundle install
to lock the gemfile to the latest versions of the gems.
you need to install ZenTest 4.6.2. if you use rails 3.1,you will find that autotest-rails (4.1.1) dependency on ZenTest (= 4.5.0). just modified the Gemfile.lock, search the ZenTest, change it to use 4.6.2, and change the
autotest (4.4.6)
ZenTest (= 4.5.0)
to
autotest (4.4.6)
ZenTest (= 4.6.2)
then, run
bundle install
That's all.
精彩评论