Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors installing rvm_passenger v0.8.2 ... however v0.8.0 works fine ??? #133

Open
stepheneb opened this issue Feb 24, 2013 · 8 comments
Open

Comments

@stepheneb
Copy link

Am using librarian 0.0.26.

This Chefile spec for rvm_passenger works fine:

cookbook 'rvm_passenger', :git => 'git://github.com/fnichol/chef-rvm_passenger.git', :ref => 'v0.8.0'

However trying to update to v0.8.2 causes the undefined method `correct?' error:

cookbook 'rvm_passenger', :git => 'git://github.com/fnichol/chef-rvm_passenger.git', :ref => 'v0.8.2'

I tried to simplify the problem and got a different error.

I deleted librarian's cache in the tmp dir and then tried to update just rvm_passenger

$ librarian-chef update --verbose rvm_passenger
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-darwin10.8.0
[Librarian] Rubygems Version: 1.8.25
[Librarian] Librarian Version: 0.0.26
[Librarian] Librarian Adapter: chef
[Librarian] Project: /Users/stephen/dev/concord/lab/config/littlechef
[Librarian] Specfile: Cheffile
[Librarian] Lockfile: Cheffile.lock
[Librarian] Git: /usr/local/bin/git
[Librarian] Git Version: git version 1.8.0.2
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Pre-Cached Sources:
[Librarian]   [:site, "http://community.opscode.com/api/v1", {}]
[Librarian]   [:git, "git://github.com/opscode-cookbooks/java.git", {}]
[Librarian]   [:git, "git://github.com/mdxp/nodejs-cookbook.git", {}]
[Librarian]   [:git, "git://github.com/balbeko/chef-npm.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm_passenger.git", {:ref=>"v0.8.0"}]
[Librarian]   [:git, "git://github.com/phlipper/chef-zip.git", {}]
[Librarian]   [:git, "git://github.com/realityforge/chef-authbind.git", {}]
[Librarian] Post-Cached Sources:
[Librarian]   [:site, "http://community.opscode.com/api/v1", {}]
[Librarian]   [:git, "git://github.com/opscode-cookbooks/java.git", {}]
[Librarian]   [:git, "git://github.com/mdxp/nodejs-cookbook.git", {}]
[Librarian]   [:git, "git://github.com/balbeko/chef-npm.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm_passenger.git", {:ref=>"v0.8.0"}]
[Librarian]   [:git, "git://github.com/phlipper/chef-zip.git", {}]
[Librarian]   [:git, "git://github.com/realityforge/chef-authbind.git", {}]
[Librarian]   [:git, "git://github.com/fnichol/chef-rvm_passenger.git", {:ref=>"v0.8.2"}]
[Librarian] Analyzing spec and lock:
[Librarian]   Removed:
[Librarian]   ExplicitRemoved:
[Librarian]   Added:
[Librarian]   NonMatchingAdded:
[Librarian]   Changed:
[Librarian]     rvm_passenger
[Librarian]   DeepKeep:
[Librarian]     apache2
[Librarian]     apt
[Librarian]     authbind
[Librarian]     couchdb
[Librarian]     emacs
[Librarian]     git
[Librarian]     java
[Librarian]     maven
[Librarian]     nodejs
[Librarian]     npm
[Librarian]     rvm
[Librarian]     sudo
[Librarian]     users
[Librarian]     zip
[Librarian]   ShallowStrip:
[Librarian]     rvm_passenger
/Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:141:in `dependencies_of': undefined method `dependencies' for nil:NilClass (NoMethodError)
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:79:in `deep_strip!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:20:in `deep_strip'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/action/update.rb:20:in `run'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:172:in `update!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:114:in `update'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:31:in `returning_status'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `block in bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:47:in `with_environment'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/bin/librarian-chef:7:in `<top (required)>'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/librarian-chef:19:in `load'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/librarian-chef:19:in `<main>'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/ruby_noexec_wrapper:14:in `<main>'
@yfeldblum
Copy link
Contributor

The second error is different from the first error because thor, the CLI framework that we use, requires positional arguments (rvm_passenger) to come before named arguments (--verbose). In other words, add --verbose to the end of the command rather than in the middle.

@stepheneb
Copy link
Author

I get the same error if I remove --verbose

$ librarian-chef update rvm_passenger
/Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:141:in `dependencies_of': undefined method `dependencies' for nil:NilClass (NoMethodError)
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:79:in `deep_strip!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/manifest_set.rb:20:in `deep_strip'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/action/update.rb:20:in `run'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:172:in `update!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:114:in `update'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.17.0/lib/thor/task.rb:27:in `run'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.17.0/lib/thor/invocation.rb:120:in `invoke_task'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.17.0/lib/thor.rb:344:in `dispatch'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/thor-0.17.0/lib/thor/base.rb:434:in `start'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:31:in `returning_status'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `block in bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:47:in `with_environment'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/lib/librarian/cli.rb:26:in `bin!'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/gems/librarian-0.0.26/bin/librarian-chef:7:in `<top (required)>'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/librarian-chef:19:in `load'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/librarian-chef:19:in `<main>'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/stephen/.rvm/gems/ruby-1.9.3-p392@lab/bin/ruby_noexec_wrapper:14:in `<main>'

@yfeldblum
Copy link
Contributor

The line you gave above - is that the full Cheffile or just the relevant part of it?

@stepheneb
Copy link
Author

@yfeldblum
Copy link
Contributor

Thanks!

@yfeldblum
Copy link
Contributor

Gisted for future reference.

The rvm_passenger cookbook adds some constraints between v0.8.0 and v0.8.2. Librarian's resolver seems not to be handling this case well.

For now, you can force the upgrade by

  • adding a constraint on the apache2 cookbook of "~> 1.1.8"
  • changing the ref of the rvm_passenger cookbook
  • running librarian-chef install

@lukeasrodgers
Copy link

FWIW I ran into a similar issue, which was due to the old cookbook I was using not having a name attribute in metadata.rb (chef/chef#1712). librarian-chef install fixed the issue.

@heaven
Copy link

heaven commented Feb 1, 2017

This error is still there, there's nothing about the particular cookbook, just tried librarian update postgresql and got the same error.

Was able to fix by replacing this line https://github.com/applicationsonline/librarian/blob/master/lib/librarian/manifest_set.rb#L140 with the following:

names.concat index[name] ? index[name].dependencies.map(&:name) : []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants