Created
November 12, 2012 07:15
-
-
Save mkocher/4057929 to your computer and use it in GitHub Desktop.
gem_package and rvm do not like one another
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2012-11-11T23:11:03-08:00] INFO: Processing gem_package[plist] action install (pivotal_workstation::default_editor line 7) | |
[2012-11-11T23:11:11-08:00] INFO: Processing ruby_block[Set the default editor] action create (pivotal_workstation::default_editor line 10) | |
================================================================================ | |
Error executing action `create` on resource 'ruby_block[Set the default editor]' | |
================================================================================ | |
LoadError | |
--------- | |
cannot load such file -- plist | |
Cookbook Trace: | |
--------------- | |
/Users/mkocher/cookbooks/pivotal_workstation/recipes/default_editor.rb:14:in `require' | |
/Users/mkocher/cookbooks/pivotal_workstation/recipes/default_editor.rb:14:in `block (2 levels) in from_file' | |
Resource Declaration: | |
--------------------- | |
# In /Users/mkocher/cookbooks/pivotal_workstation/recipes/default_editor.rb | |
10: ruby_block "Set the default editor" do | |
11: block do | |
12: Gem.clear_paths | |
13: require 'rubygems' | |
14: require 'plist' | |
15: `plutil -convert xml1 #{plist_file}` | |
16: ls_handler_plist = Plist::parse_xml(plist_file) | |
17: new_ls_handlers = [ | |
18: { "LSHandlerContentType" => "public.plain-text", | |
19: "LSHandlerRoleAll" => ls_handler_role_all | |
20: }, | |
21: { "LSHandlerContentType" => "public.ruby-script", | |
22: "LSHandlerRoleAll" => ls_handler_role_all | |
23: }, | |
24: { "LSHandlerContentType" => "org.vim.yaml-file", | |
25: "LSHandlerRoleAll" => ls_handler_role_all | |
26: }, | |
27: { "LSHandlerContentType" => "public.xml", | |
28: "LSHandlerRoleAll" => ls_handler_role_all | |
29: } | |
30: ] | |
31: # I go through the old_ls_handlers and remove all | |
32: # the ones that we're going to replace. | |
33: new_ls_handlers.each do |new_hash| | |
34: new_hash.each do |new_key,new_value| | |
35: if new_key == "LSHandlerContentType" | |
36: ls_handler_plist["LSHandlers"].each do |old_hash| | |
37: old_hash.each do |old_key,old_value| | |
38: if new_value == old_value and new_key == old_key | |
39: ls_handler_plist["LSHandlers"].delete(old_hash) | |
40: end | |
41: end | |
42: end | |
43: end | |
44: end | |
45: end | |
46: ls_handler_plist["LSHandlers"] = ls_handler_plist["LSHandlers"] + new_ls_handlers | |
Compiled Resource: | |
------------------ | |
# Declared in /Users/mkocher/cookbooks/pivotal_workstation/recipes/default_editor.rb:10:in `from_file' | |
ruby_block("Set the default editor") do | |
action "create" | |
retries 0 | |
retry_delay 2 | |
block_name "Set the default editor" | |
cookbook_name :pivotal_workstation | |
recipe_name "default_editor" | |
block #<Proc:0x007fda28e8a580@/Users/mkocher/cookbooks/pivotal_workstation/recipes/default_editor.rb:11> | |
end | |
[2012-11-11T23:11:11-08:00] ERROR: Running exception handlers | |
[2012-11-11T23:11:11-08:00] ERROR: Exception handlers complete | |
[2012-11-11T23:11:11-08:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out | |
[2012-11-11T23:11:11-08:00] FATAL: LoadError: ruby_block[Set the default editor] (pivotal_workstation::default_editor line 10) had an error: LoadError: cannot load such file -- plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment