express42 / postgresql_lwrp

Express 42 postgresql cookbook
MIT License
55 stars 16 forks source link

Name conflict with database cookbook #18

Closed halida closed 9 years ago

halida commented 9 years ago

I want to use postgresql_lwrp to install server, and database to create user and databases, And I got this error:

TypeError
---------
superclass mismatch for class PostgresqlDatabase

Cookbook Trace:
---------------
  /tmp/chef-solo/berks-cookbooks/postgresql_lwrp/libraries/resource_postgresql_database.rb:5:in `<class:Resource>'
  /tmp/chef-solo/berks-cookbooks/postgresql_lwrp/libraries/resource_postgresql_database.rb:4:in `<class:Chef>'
  /tmp/chef-solo/berks-cookbooks/postgresql_lwrp/libraries/resource_postgresql_database.rb:3:in `<top (required)>'

Relevant File Content:
----------------------
/tmp/chef-solo/berks-cookbooks/postgresql_lwrp/libraries/resource_postgresql_database.rb:

  1:  require 'chef/resource'
  2:  
  3:  class Chef
  4:    class Resource
  5>>     class PostgresqlDatabase < Chef::Resource

It turns out there is a name conflict between postgresql_lwrp and database cookbook, please help to solve it.

https://github.com/express42-cookbooks/postgresql_lwrp/blob/master/libraries/resource_postgresql_database.rb#L5

https://github.com/opscode-cookbooks/database/blob/master/libraries/resource_postgresql_database.rb#L25

sample commented 9 years ago

We will investigate this issue soon.

sample commented 9 years ago

postgresql_lwrp cookbook is incompatible with database cookbook. If you want create users and databases, please use our LWRP for this. You can see examples in README.

halida commented 9 years ago

Got that, I will use postgresql recipe instead.