Invalid gemspec -Illformed requirement ["#<YAML::Syck::DefaultKey:0xb5f9c990> 3.2.0"]
Asked Answered
D

3

19
Invalid gemspec in [/usr/lib/ruby/gems/1.8/specifications/activemodel-3.2.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0xb5f9c990> 3.2.0"]

From trying to do a sudo gem update for other issues

getting this hundreds of time as sudo gem update goes through each gem and gets the message for most of them

Dionedionis answered 25/1, 2012 at 15:0 Comment(0)
B
24

This can happen when upgrading to Rails 3.2.

Updating Rubygems should fix this issue.

gem update --system

Hope this helps.

Burnside answered 25/1, 2012 at 15:22 Comment(3)
sort of. It fixed the immediate issue... and raised gem install linecache19 -v '0.5.11' Building native extensions. This could take a while... ERROR: Error installing linecache19: ERROR: Failed to build gem native extension. /home/durrantm/.rvm/rubies/ruby-1.8.7-p352/bin/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack ofDionedionis
which I will post separately.Dionedionis
I had the same problem with dm-active_model-1.2.1 and rails 3.1. Updating rubygems fixed it :) Thanks! This was the error I got: Invalid gemspec in [[project_dir]/shared/bundle/ruby/1.9.1/specifications/dm-active_model-1.2.1.gemspec]: Illformed requirement ["#<Syck::DefaultKey:0x9a7f798> 1.2.3"]Collation
F
8

I still had the errors after updating the rubygem.

Then I ran rvm gemset empty to delete the gems. This fixed it for me.

Freestone answered 5/2, 2012 at 21:0 Comment(3)
I had to use "rvmsudo rvm gemset empty" for my globally installed gems, but thanks for the empty tip !Reefer
Where do you get the "rvm" or "rvmsudo" commands from? My system doesn't seem to have those.Balk
rvm is a ruby version manager (rvm.io). A utility to have several ruby version installed, with their own gems. Running this command won't help with this problem if you don't already have rvm installed.Freestone
H
1

I had this issue, but all the methods above did not help.

So, I decided to move all the *3.2.0.spec within directory

/usr/local/ruby/lib/ruby/gems/1.9.1/specifications

into another directory, and things are solved.

Command:

sudo mv /usr/local/ruby/lib/ruby/gems/1.9.1/specifications/actionmailer-3.2.0.gemspec <another_dir>

Perform similar commands to other files:

  • actionpack-3.2.0.gemspec
  • activemodel-3.2.0.gemspec
  • activerecord-3.2.0.gemspec
  • activeresource-3.2.0.gemspec
  • activesupport-3.2.0.gemspec
  • newrelic_rpm-3.2.0.gemspec
  • rails-3.2.0.gemspec
  • railties-3.2.0.gemspec
Hindbrain answered 16/5, 2012 at 9:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.