rubygems - gem_package fails in Ruby 1.9.3 - undefined method 'full_name' for nil -


i'm using chef set node running ubuntu 12.04. wanted use ruby 1.9.3, including chef, , i'm using this custom bootstrap file found accomplish it. (i tried using rvm in conjunction chef, , found caused problems @ every turn - hoping less error-prone.)

when run chef-client on node, reaches point of attempting install rails application, tries install bundler, , fails, thus:

recipe: <dynamically defined resource>   * gem_package[bundler] action install ================================================================================ error executing action `install` on resource 'gem_package[bundler]' ================================================================================   nomethoderror ------------- undefined method `full_name' nil:nilclass   resource declaration: --------------------- # in /var/chef/cache/cookbooks/application_ruby/providers/rails.rb  162:     gem_package gem 163:       action :install 164:       source src if src 165:       version ver if ver && ver.length > 0 166:     end 167:   end    compiled resource: ------------------ # declared in /var/chef/cache/cookbooks/application_ruby/providers/rails.rb:162:in `block in install_gems'  gem_package("bundler")   provider chef::provider::package::rubygems   action [:install]   retries 0   retry_delay 2   package_name "bundler"   version ">1.3"   cookbook_name "tiptap_api" end 

to attempt isolate problem, placed following call gem_package in recipe before deployment attempt:

gem_package 'bundler'   version '>0'   action :install end 

this, too, fails, in same way.

i found gem executable installed apt-get named gem1.9.1. thought might problem, , renamed gem. once done, run sudo gem install bundler , without problems, chef-client still produces error.

what's going on, how can fix it, , why error message terrible?

from stack trace, seems want install gem called bundler. however, gem doesn't exist results in error observe. want install bundler gem instead. case matters in ruby world :)

while true error message rather misleading, reason case of non-existing gem not explicitly checked chef , assumptions in later stages of code break resulting in strange error.

this in turn might considered bug in chef might want report on http://tickets.opscode.com/ (at least if still issue in current version of chef, haven't checked that).


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -