copiousfreetime / stickler

a tool to organize and maintain an internal gem distribution server
MIT License
143 stars 29 forks source link

Running stickler command-line against ruby-1.9.3-p327 fails with NoMethodError #35

Closed kinsersh closed 10 years ago

kinsersh commented 10 years ago

This worked just fine with the previous version of stickler (2.2.4). It looks like you're rescuing with a LoadError, but it's a NoMethodError that's being raised instead. Am I right to assume you want this to still work with version 1.9.3 for a while?

kinsersh@kinsersh-VirtualBox:~/sandbox/blueprint-deploy (inline-acceptance-test-mgr *)$ stickler push pkg/blueprint-deploy-0.0.409.gem --server http://myserver:6789 Pushing gem(s) to http://myserver:6789/ ... /home/kinsersh/sandbox/blueprint-deploy/pkg/blueprint-deploy-0.0.409.gem -> /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/gem_container.rb:26:in load_container': undefined methodnew' for Gem::Package:Module (NoMethodError) from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/gem_container.rb:12:in initialize' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/repository/remote.rb:279:innew' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/repository/remote.rb:279:in specification_from_gem_file' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/repository/remote.rb:275:inspeclite_from_gem_file' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/repository/remote.rb:82:in push' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/client/push.rb:39:inblock in run' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/client/push.rb:35:in each' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/lib/stickler/client/push.rb:35:inrun' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/gems/stickler-2.4.0/bin/stickler:47:in <top (required)>' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/bin/stickler:19:inload' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/bin/stickler:19:in <main>' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:ineval' from /home/kinsersh/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `

'

kinsersh@kinsersh-VirtualBox:~/sandbox/blueprint-deploy (inline-acceptance-test-mgr *)$ ruby -e 'puts RUBY_DESCRIPTION' ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

kinsersh@kinsersh-VirtualBox:~/sandbox/blueprint-deploy (inline-acceptance-test-mgr *)$ cat /etc/issue Ubuntu 13.04 \n \l

kinsersh@kinsersh-VirtualBox:~/sandbox/blueprint-deploy (inline-acceptance-test-mgr *)$ ruby -rubygems -e "require 'stickler'; puts Stickler::VERSION" 2.4.0

breeves commented 10 years ago

This error is because you have an older version of rubygems that does not support the .new method. Update your rubygems version and the push will work just fine.. ( I recommend rubygems 2.1.7 )

nterry commented 10 years ago

if i install rubygems-update on a 1.9.3 install with rvm, will it be patched?

breeves commented 10 years ago

gem update --system should do the right thing for you under rvm.. But, sometimes rvm does odd things. If you have trouble with that, grab the gem from rubygems.org and install it. (rubygems-update-2.1.7.gem)

kinsersh commented 10 years ago

Verified. Upgrading to a newer rubygems with 'gem update --system' worked with ruby 1.9.3.

kinsersh commented 10 years ago

Thanks for the help.

copiousfreetime commented 10 years ago

I've made #36 to fix this so it won't happen to others. Thanks @kinsersh for finding it and @breeves for helping out.