Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I updated ruby gems, and now i get parse tree errors and deprecation warnings everywhere!

The error in short:

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 /opt/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91.
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/gem_dependency.rb:275:in `==': undefined method `name' for "ParseTree":String (NoMethodError)

using

ruby 1.8.7
rails 2.3.8
rubygems 1.8.5

what do I do?

I've tried deleting the rubygems folder, and doing a clean rubygems install... but the above errer remains.

like image 731
NullVoxPopuli Avatar asked Jun 22 '11 14:06

NullVoxPopuli


1 Answers

There have been a lot of structural changes in rubygems that has caught a lot of people by surprise. It has introduced incompatibility problems with a number of common applications and frameworks.

You may need to roll back to a version of rubygems that works with your system, such as 1.6.0:

gem update --system 1.6.0

If that doesn't work, you may want to investigate slimgems which is a 1.3.7 fork of rubygems that is intended to remedy these compatibility issues.

like image 65
tadman Avatar answered Oct 21 '22 20:10

tadman