dewski / json_builder

Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. JSON Builder is here to help.
http://garrettbjerkhoel.com/json_builder/
MIT License
243 stars 52 forks source link

Problem with Bundle Install #11

Closed denisemauldin closed 12 years ago

denisemauldin commented 13 years ago

ruby 1.9.2p136 on x86_64 linux CentOS with rails 3.1.1

muster > bundle install WARNING: ArgumentError: Illformed requirement ["Syck::DefaultKey:0x0000000d577080 3.0.10"] -- encoding: utf-8 --

Gem::Specification.new do |s|
  s.name = %q{json_builder}
  s.version = "3.0.3"

  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  s.authors = ["Garrett Bjerkhoel"]
  s.date = %q{2011-12-02 00:00:00.000000000Z}
  s.description = %q{Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. The standard to_json works well, but can get very verbose when you need full control of what is generated. JSON Builder hopes to solve that problem.}
  s.email =     ["me@garrettbjerkhoel.com"]
  s.files = [".gitignore", "Gemfile", "Gemfile.lock", "MIT-LICENSE", "README.md", "Rakefile", "json_builder.gemspec", "lib/blankslate.rb", "lib/json_builder.rb", "lib/json_builder/compiler.rb", "lib/json_builder/elements.rb", "lib/json_builder/member.rb", "lib/json_builder/template.rb", "lib/json_builder/value.rb", "lib/json_builder/version.rb", "spec/benchmarks/builder.rb", "spec/dummy/Rakefile", "spec/dummy/app/controllers/application_controller.rb", "spec/dummy/app/controllers/users_controller.rb", "spec/dummy/app/helpers/application_helper.rb", "spec/dummy/app/helpers/users_helper.rb", "spec/dummy/app/models/user.rb", "spec/dummy/app/views/layouts/application.html.erb", "spec/dummy/app/views/users/index.json_builder", "spec/dummy/config.ru", "spec/dummy/config/application.rb", "spec/dummy/config/boot.rb", "spec/dummy/config/database.yml", "spec/dummy/config/environment.rb", "spec/dummy/config/environments/development.rb", "spec/dummy/config/environments/production.rb", "spec/dummy/config/environments/test.rb", "spec/dummy/config/initializers/backtrace_silencers.rb", "spec/dummy/config/initializers/inflections.rb", "spec/dummy/config/initializers/mime_types.rb", "spec/dummy/config/initializers/secret_token.rb", "spec/dummy/config/initializers/session_store.rb", "spec/dummy/config/locales/en.yml", "spec/dummy/config/routes.rb", "spec/dummy/db/development.sqlite3", "spec/dummy/db/migrate/20111127061428_create_users.rb", "spec/dummy/db/schema.rb", "spec/dummy/db/test.sqlite3", "spec/dummy/log/production.log", "spec/dummy/log/server.log", "spec/dummy/public/404.html", "spec/dummy/public/422.html", "spec/dummy/public/500.html", "spec/dummy/public/favicon.ico", "spec/dummy/public/javascripts/application.js", "spec/dummy/public/javascripts/controls.js", "spec/dummy/public/javascripts/dragdrop.js", "spec/dummy/public/javascripts/effects.js", "spec/dummy/public/javascripts/prototype.js", "spec/dummy/public/javascripts/rails.js", "spec/dummy/public/stylesheets/.gitkeep", "spec/dummy/script/rails", "spec/dummy/spec/controllers/users_controller_spec.rb", "spec/integration/navigation_spec.rb", "spec/json_builder_spec.rb", "spec/spec_helper.rb", "spec/support/json_builder.rb", "spec/unit/json_builder_spec.rb"]
  s.require_paths = ["lib"]
  s.rubygems_version = %q{1.3.7}
  s.summary = %q{Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. The standard to_json works well, but can get very verbose when you need full control of what is generated. JSON Builder hopes to solve that problem.}
  s.test_files = ["spec/benchmarks/builder.rb", "spec/dummy/Rakefile", "spec/dummy/app/controllers/application_controller.rb", "spec/dummy/app/controllers/users_controller.rb", "spec/dummy/app/helpers/application_helper.rb", "spec/dummy/app/helpers/users_helper.rb", "spec/dummy/app/models/user.rb", "spec/dummy/app/views/layouts/application.html.erb", "spec/dummy/app/views/users/index.json_builder", "spec/dummy/config.ru", "spec/dummy/config/application.rb", "spec/dummy/config/boot.rb", "spec/dummy/config/database.yml", "spec/dummy/config/environment.rb", "spec/dummy/config/environments/development.rb", "spec/dummy/config/environments/production.rb", "spec/dummy/config/environments/test.rb", "spec/dummy/config/initializers/backtrace_silencers.rb", "spec/dummy/config/initializers/inflections.rb", "spec/dummy/config/initializers/mime_types.rb", "spec/dummy/config/initializers/secret_token.rb", "spec/dummy/config/initializers/session_store.rb", "spec/dummy/config/locales/en.yml", "spec/dummy/config/routes.rb", "spec/dummy/db/development.sqlite3", "spec/dummy/db/migrate/20111127061428_create_users.rb", "spec/dummy/db/schema.rb", "spec/dummy/db/test.sqlite3", "spec/dummy/log/production.log", "spec/dummy/log/server.log", "spec/dummy/public/404.html", "spec/dummy/public/422.html", "spec/dummy/public/500.html", "spec/dummy/public/favicon.ico", "spec/dummy/public/javascripts/application.js", "spec/dummy/public/javascripts/controls.js", "spec/dummy/public/javascripts/dragdrop.js", "spec/dummy/public/javascripts/effects.js", "spec/dummy/public/javascripts/prototype.js", "spec/dummy/public/javascripts/rails.js", "spec/dummy/public/stylesheets/.gitkeep", "spec/dummy/script/rails", "spec/dummy/spec/controllers/users_controller_spec.rb", "spec/integration/navigation_spec.rb", "spec/json_builder_spec.rb", "spec/spec_helper.rb", "spec/support/json_builder.rb", "spec/unit/json_builder_spec.rb"]

  if s.respond_to? :specification_version then
    current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
    s.specification_version = 3

    if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
      s.add_runtime_dependency(%q<activesupport>, [">= 2.0.0"])
      s.add_development_dependency(%q<rspec-rails>, [">= 2.0.0.beta"])
      s.add_development_dependency(%q<rails>, ["#<Syck::DefaultKey:0x0000000d577080> 3.0.10"])
      s.add_development_dependency(%q<sqlite3>, [">= 0"])
      s.add_development_dependency(%q<capybara>, [">= 0.4.0"])
    else
      s.add_dependency(%q<activesupport>, [">= 2.0.0"])
      s.add_dependency(%q<rspec-rails>, [">= 2.0.0.beta"])
      s.add_dependency(%q<rails>, ["#<Syck::DefaultKey:0x0000000d577080> 3.0.10"])
      s.add_dependency(%q<sqlite3>, [">= 0"])
      s.add_dependency(%q<capybara>, [">= 0.4.0"])
    end
  else
    s.add_dependency(%q<activesupport>, [">= 2.0.0"])
    s.add_dependency(%q<rspec-rails>, [">= 2.0.0.beta"])
    s.add_dependency(%q<rails>, ["#<Syck::DefaultKey:0x0000000d577080> 3.0.10"])
    s.add_dependency(%q<sqlite3>, [">= 0"])
    s.add_dependency(%q<capybara>, [">= 0.4.0"])
  end
end
WARNING:  Invalid .gemspec format in '/u5/tools/rvm/gems/ruby-1.9.2-p136@rails3/specifications/json_builder-3.0.3.gemspec'
denisemauldin commented 13 years ago

s.add_dependency(%q, ["#Syck::DefaultKey:0x0000001e896cf0 3.0.10"])

These lines are incorrect. Replace the #Syck:DefaultKey:XXXX with an = sign and it works fine.

dewski commented 13 years ago

I downloaded and extracted the gem from Rubygems and my gemspec has the ["= 3.0.10"] rather than Syck::DefaultKey.

I also tried deleting the gem and re-bundling with no issue.

dewski ~/Work/sites/clientend 
$ gem uninstall json_builder

Select gem to uninstall:
 1. json_builder-3.0.1
 2. json_builder-3.0.3
 3. All versions
> 3
Successfully uninstalled json_builder-3.0.1
Successfully uninstalled json_builder-3.0.3
dewski ~/Work/sites/clientend 
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]
dewski ~/Work/sites/clientend 
$ bundle install
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Using rake (0.9.2.2) 
Using multi_json (1.0.4) 
Using activesupport (3.1.3) 
Using builder (3.0.0) 
Using i18n (0.6.0) 
Using activemodel (3.1.3) 
Using erubis (2.7.0) 
Using rack (1.3.5) 
Using rack-cache (1.1) 
Using rack-mount (0.8.3) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.0.3) 
Using actionpack (3.1.3) 
Using mime-types (1.17.2) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Using mail (2.3.0) 
Using actionmailer (3.1.3) 
Using arel (2.2.1) 
Using tzinfo (0.3.31) 
Using activerecord (3.1.3) 
Using activeresource (3.1.3) 
Using ansi (1.4.1) 
Using bcrypt-ruby (3.0.1) 
Using bson (1.5.1) 
Using bson_ext (1.5.1) 
Using bundler (1.1.rc) 
Using highline (1.6.8) 
Using net-ssh (2.2.1) 
Using net-scp (1.0.4) 
Using net-sftp (2.0.5) 
Using net-ssh-gateway (1.1.0) 
Using capistrano (2.9.0) 
Using carrierwave (0.5.8) 
Using coffee-script-source (1.1.3) 
Using execjs (1.2.9) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.2) 
Using json (1.6.3) 
Using rdoc (3.11) 
Using thor (0.14.6) 
Using railties (3.1.3) 
Using coffee-rails (3.1.1) 
Using orm_adapter (0.0.5) 
Using warden (1.1.0) 
Using devise (1.5.2) 
Using jquery-rails (1.0.19) 
Installing json_builder (3.0.3) 
Using rails (3.1.3) 
Using kaminari (0.12.4) 
Using mongo (1.5.1) 
Using mongoid (2.3.4) 
Using stringex (1.3.0) 
Using mongoid_slug (0.8.3) 
Using sass (3.1.11) 
Using sass-rails (3.1.5) 
Using turn (0.8.2) 
Using uglifier (1.1.0) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

I opened up the downloaded gemspec within RVM and this is the contents:

$:.push File.expand_path("../lib", __FILE__)  
require "json_builder/version"

Gem::Specification.new do |s|
  s.name = "json_builder"
  s.version = JSONBuilder::VERSION
  s.summary = "Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. The standard to_json works well, but can get very verbose when you need full control of what is generated. JSON Builder hopes to solve that problem."
  s.description = "Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. The standard to_json works well, but can get very verbose when you need full control of what is generated. JSON Builder hopes to solve that problem."
  s.authors     = ["Garrett Bjerkhoel"]
  s.email       = ["me@garrettbjerkhoel.com"]
  s.platform    = Gem::Platform::RUBY

  s.files         = `git ls-files`.split("\n")  
  s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")  
  s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }  
  s.require_paths = ["lib"]

  s.add_dependency "activesupport", ">= 2.0.0"
  s.add_development_dependency "rspec-rails", ">= 2.0.0.beta"
  s.add_development_dependency "rails", "3.0.10"
  s.add_development_dependency "sqlite3"
  s.add_development_dependency "capybara", ">= 0.4.0"
end
denisemauldin commented 13 years ago

muster > gem uninstall json_builder Successfully uninstalled json_builder-3.0.3 muster > gem install json_builder Successfully installed json_builder-3.0.3 1 gem installed Installing ri documentation for json_builder-3.0.3... Installing RDoc documentation for json_builder-3.0.3...

ruby -v ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux] bundle install WARNING: #ArgumentError: Illformed requirement ["#Syck::DefaultKey:0x00000011197fd8 3.0.10"] Using rake (0.9.2.2) Using multi_json (1.0.3) Using activesupport (3.1.1) Using builder (3.0.0) Using i18n (0.6.0) Using activemodel (3.1.1) Using erubis (2.7.0) Using rack (1.3.4) Using rack-cache (1.1) Using rack-mount (0.8.3) Using rack-test (0.6.1) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.0.2) Using actionpack (3.1.1) Using mime-types (1.16) Using polyglot (0.3.2) Using treetop (1.4.10) Using mail (2.3.0) Using actionmailer (3.1.1) Using arel (2.2.1) Using tzinfo (0.3.30) Using activerecord (3.1.1) Using activeresource (3.1.1) Using bundler (1.0.18) Using rack-ssl (1.3.2) Using json (1.6.1) Using rdoc (3.10) Using thor (0.14.6) Using railties (3.1.1) Using rails (3.1.1) Using acts_as_audited (2.0.0) Using posix-spawn (0.3.6) Using albino (1.3.3) Using ancestry (1.2.4) Using archive-tar-minitar (0.5.2) Using auto_strip_attributes (1.1) Using awesome_nested_set (2.0.2) Using bcrypt-ruby (3.0.1) Using cancan (1.6.7) Using highline (1.6.2) Using net-ssh (2.2.1) Using net-scp (1.0.4) Using net-sftp (2.0.5) Using net-ssh-gateway (1.1.0) Using capistrano (2.9.0) Using cocaine (0.2.0) Using columnize (0.3.4) Using orm_adapter (0.0.5) Using warden (1.0.6) Using devise (1.4.8) Using net-ldap (0.2.2) Using devise_ldap_authenticatable (0.4.9) Using diff-lcs (1.1.3) Using event-calendar (2.3.3) Using formtastic (2.0.2) Using github-markup (0.5.3) Using grit (2.4.1) Using mustache (0.99.4) Using nokogiri (1.5.0) Using redcarpet (1.17.2) Using sanitize (2.0.3) Using rack-protection (1.1.4) Using sinatra (1.3.1) Using gollum (1.3.1) Using jquery-rails (1.0.14) Using json_builder (3.0.3) Using ruby_core_source (0.1.5) Using linecache19 (0.5.12) Using madeline (0.1.8) Using mysql (2.8.1) Using paperclip (2.4.3) Using rspec-core (2.6.4) Using rspec-expectations (2.6.0) Using rspec-mocks (2.6.0) Using rspec (2.6.0) Using rspec-rails (2.6.1) Using ruby-debug-base19 (0.11.25) Using ruby-debug19 (0.11.6) Using rubyzip (0.9.4) Using settingslogic (2.0.6) Using simple_navigation (1.4.5) Using will_paginate (3.0.2) WARNING: Invalid .gemspec format in '/tools/rvm/gems/ruby-1.9.2-p136@rails3/specifications/json_builder-3.0.3.gemspec'

I opened the gemspec and it showed the same Syck keys for the rails add_dependencies. I changed those to '=' and it works fine. My rvm is 1.2.6. Let me know if I can be of any further assistance.

wireframe commented 12 years ago

same issue here. i'm unable to run the gem without tweaking the gemspec.

env: RVM REE 1.8.7

chrisbutlerccc commented 12 years ago

Same problem?

Installing json_builder (3.0.3) Invalid gemspec in [/Users/.../.rvm/gems/ruby-1.8.7-p299/specifications/json_builder-3.0.3.gemspec]: Illformed requirement ["#YAML::Syck::DefaultKey:0x457a6f8 3.0.10"]

dewski commented 12 years ago

I have since pushed a new version to Rubygems, can you guys try again? I confirmed it works on RVM and REE 1.8.7 and Ruby 1.9.2 as well as 1.9.3.

chrisbutlerccc commented 12 years ago

Seem to have fixed it for me. I was able to bundle install without issue. Thanks!

dewski commented 12 years ago

It seems this fixed it. If it still continues for you, please re-open this or report it again.