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

FATAL: NameError: uninitialized constant Chef::Recipe::Opscode #10

Open
ramontayag opened this issue Dec 16, 2012 · 9 comments
Open

FATAL: NameError: uninitialized constant Chef::Recipe::Opscode #10

ramontayag opened this issue Dec 16, 2012 · 9 comments

Comments

@ramontayag
Copy link
Contributor

I'm running into an error FATAL: NameError: uninitialized constant Chef::Recipe::Opscode when I attempt to run the server recipe.

I'm on Ubuntu 10.04.

It seems that others have run into it too.

Perhaps there's something wrong with the way we configured stuff?

You can see the full error here.

@ramontayag
Copy link
Contributor Author

Adding recipe[openssl] in the run_list before this postgresql recipe fixed it. What do you think a good fix for this is? I add one of the following to my fork and submit a pull request:

  • If Chef::Recipe::Opscode is not defined, then fail and let the user that they need the openssl recipe.
  • Include the openssl recipe from the beginning to avoid this error.

@jdugan
Copy link

jdugan commented Jan 30, 2013

Honestly, I'm not sure what the Chef-y way to do this is. Since the cookbook declares OpenSSL as a dependency, I'm inclined to have our cookbook simply do what's required without human intervention.

I wonder if it would be enough to add include_recipe "openssl" before the statement that tries to use the password library?

@ramontayag
Copy link
Contributor Author

I can try that! Let you know if it works.

@ichilton
Copy link

Any update on the best fix to this? - adding openssl to the runlist seems a bit nasty.

Adding include_recipe "openssl" doesn't seem to work - presumably because the default recipe is empty and the needed code is in a library.

@ramontayag
Copy link
Contributor Author

Sorry this got buried. I believe adding openssl worked.

@ichilton
Copy link

ichilton commented Jul 1, 2013

Is there a way to include openssl from the postgresql cookbook/recipe? - adding: include_recipe "openssl" doesn't work.

Adding it to the runlist works, but I don't really want that cluttered.

Thanks,

Ian

@ramontayag
Copy link
Contributor Author

Hmm yeah I don't know how else. Yes, you're right it'll get cluttered though.

@SkyWriter
Copy link

Using both:

include_recipe "openssl"
include_recipe "postgresql::server"

And adding dependency to my site-cookbook like this:

depends          'openssl'
depends          'postgresql'

... solved my problem without cluttering the runlist.

@jmara
Copy link

jmara commented Nov 8, 2013

Usually you don't need to include_recipe a library cookbook. To access the methods it should work to depend it in the metadata.rb:

depends 'openssl'

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

5 participants