RiotGamesCookbooks / rbenv-cookbook

Installs and configures rbenv
http://community.opscode.com/cookbooks/rbenv
Apache License 2.0
137 stars 109 forks source link

No resource, method, or local variable named `rbenv_root_path' #100

Open 0xdevalias opened 10 years ago

0xdevalias commented 10 years ago

I'm sure this is just me doing something silly, but i'm getting this error when I try to use the recipe as described in the README and I can't figure out why.

NameError
---------
No resource, method, or local variable named `rbenv_root_path' for `Chef::Recipe "default"'

My recipe includes

include_recipe "rbenv::default"
include_recipe "rbenv::ruby_build"

rbenv_ruby "1.9.3"

Any help would be hugely appreciated!!

jcoleman commented 10 years ago

You need to add depends 'rbenv' to your metadata.rb file rather than just using include_recipe "ruby_build::default". Otherwise in Chef 11 not all of the files get loading and that method isn't recognized.

Edit: see http://stackoverflow.com/questions/20361738/include-recipe-vs-vagrantfile-chef-add-recipe-whats-the-difference/20375077#20375077 for more details.

0xdevalias commented 10 years ago

Cool, thanks for that :) Will definitely take a look when I get the time to work on it again!