RiotGamesCookbooks / rbenv-cookbook

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

Cannot find a resource for rbenv_root on ubuntu version 12.04 #60

Closed jwalton closed 11 years ago

jwalton commented 11 years ago

I'm writing a chef recipe to install Shopify's dashing dashboard:

https://github.com/benbria/dashing-chef

My recipe does a pretty vanilla rbenv install:

# Rbenv, Ruby and Gem
include_recipe "rbenv::default"
include_recipe "rbenv::ruby_build"
rbenv_ruby node["dashing"]["ruby_version"]

If I include dashing in my run_list, then everything works fine. But, dashing provides LWRPs, so it's not meant to work this way, of course.

If I create a new cookbook called dashboard, and then include dashing in dashboard/recipes/default.rb like so:

include_recipe 'dashing::default'

Then rbenv fails with Cannot find a resource for rbenv_root on ubuntu version 12.04.

(Yeah, I agree. Weeeeird.)

Logs from both cases can be found here:

https://gist.github.com/jwalton/11e62c2daa798e58b434

jwalton commented 11 years ago

So, the problem was that the dashboard cookbook failed to list the dashing cookbook as a dependency. Once I fixed that, this went away.

Interesting that Chef is smart enough to find the rbenv recipes, but not the rbenv libraries. :P