How do I fix Rubygems recent deprecation warning?
I had to downgrade to 1.6.2. Those notices are absolutely ridiculous. They make the latest version completely unusable. There should really be a way to disable them, but until then:
sudo gem update --system 1.6.2
How to avoid deprecation messages from RubyGems?
You probably need to regenerate your gem specifications.
After installing RubyGems 1.8.1 you will see deprecations when loading your exsting gems. Run gem pristine --all --no-extensions to regenerate your gem specifications safely.
http://blog.segment7.net/2011/05/05/rubygems-1-8-1
Silence deprecation warning generated from of a gem
ActiveSupport::Deprecation.silenced = true
How to handle deprecated gem warning (SourceIndex#all_gems)?
I got the same errors for a bunch of my gems in a non-Rails environment when I upgraded to rubygems 1.8.0. I got the warnings any time rubygems is required. Looking around the 'Net, it seems like it might be a problem also with rubygems 1.7.x, but I never had one of those versions installed so I'm not sure. I fixed this by running:
gem pristine --all --no-extensions
I had to run it a few times - it kept erroring out (but usually not in the same place from run to run). Eventually it got far enough that it had addressed the majority of my gems.
There were a few gems that didn't get their specifications regenerated correctly (json and sequel, specifically in my case) because they needed to build an extension. (The gem command output indicated it was skipping them, though it was easy to miss that message amidst all the deprecation warnings.) For those gems, I uninstalled them and then reinstalled them again (they'd previously been installed by bundler in rubygems 1.5.x) and that fixed the remaining warnings. It may be that I could have started with that plan of attack originally, but I didn't try.
Still getting deprecation warnings in Rails3.1
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.
GEM Version Requirements Deprecated
did you try:
rake gems:install
Btw. If you are using rubygems 1.3.6 then you get this deprecation warning. Previous versions never gave a warning. Also i suggest installing any gem using the command line rather than adding it in the environment.rb file. If the gem(s) you have added in the file is/are not installed, then the generator or any rake task will simply not run. Its a minor bug.
Here is an article that describes a way to prevent the warning:
http://www.mattvsworld.com/blog/2010/03/version_requirements-deprecated-warning-in-rails/
Its no big deal though. Just install gems the normal way and don't add any to your environment.rb file. You'll never get the deprecation warning.
How to detect what causes a deprecation warning in Rake
I find it easier modifying the the line from warn
to raise
in rake-11.1.0/lib/rake/task_manager.rb:10
.
For me the offending gems are rspec (fixed in 3.4.4) and rubocop (fixed in 0.38.0).
Related Topics
Colon (:) Appears as Forward Slash (/) When Creating File Name
How to Simulate Java-Like Annotations in Ruby
Errno::Econnrefused: Connection Refused - Connect(2) for Action Mailer
What's the Point of Unary Plus Operator in Ruby
How to Sort a Ruby Hash by Number Value
Understanding Ruby .Class and .Ancestors Methods
How to Extract a Sub-Hash from a Hash
Magic First and Last Indicator in a Loop in Ruby/Rails
Digital Signature Verification with Openssl
How to Run a Ruby Script Using Rbenv with Cron
How to Uninstall Ruby on Rails on MAC Os X
Rails Gem Rails3-Jquery-Autocomplete How to Scope by User
Call Controller from Rake Task
Ruby Craziness: Class VS Object
In Ruby's Test::Unit::Testcase, How to Override the Initialize Method