puppet-property_list_key icon indicating copy to clipboard operation
puppet-property_list_key copied to clipboard

Require statement for CFPropertyList fails on case-sensistive filesystems

Open smh opened this issue 11 years ago • 15 comments

When using this on case-sensitive filesystems, I get this error:

Failed to load feature test for cfpropertylist: cannot load such file -- CFPropertyList

Runs ok when changing the require to: require 'cfpropertylist'

smh avatar Dec 23 '13 08:12 smh

I'm still getting an error on OS X about not being able to find a suitable provider when using your fork. Is there anything that you had to change in your manifest to get this working?

bryankennedy avatar Feb 10 '14 19:02 bryankennedy

I'm wary of this because the last time I tested it out, it actually did NOT work for me (see: https://github.com/glarizza/puppet-property_list_key/issues/12#issuecomment-31022799 ). I will need to test on a case-sensitive filesystem. Also, on what version of OS X are you running?

glarizza avatar Feb 11 '14 02:02 glarizza

I'm running the latest Mavericks. I tried adding the bundle command you mention in the readme, but I continued to get an error about the system not being able to find CFPropertyList. So it's possible my experience is separate from this issue.

bryankennedy avatar Feb 11 '14 03:02 bryankennedy

@glarizza Maybe README should be updated to remove the update of system gem and add to Gemfile in your boxen repo and run bundle install (for Gemfile.lock) update?

cdenneen avatar Feb 11 '14 03:02 cdenneen

@cdenneen I've got the "OR" lines in there to accommodate users of each (either bundler or system gems). Bundler is probably overkill if you're just managing workstations via Puppet and they're running puppet agent to connect to the master. However, if you're using Bundler, the Gemfile is the thing. I really don't want to teach Bundler on the Readme, as that's DEFINITELY out of scope :)

glarizza avatar Feb 11 '14 03:02 glarizza

@bryankennedy Are you using Bundler, though? If so, you'll need the Gemfile. If you're NOT, then you just need to update the Rubygem on the system. How are you testing this out - are you using something like Boxen, or are you doing something like running puppet apply on the system, or are you setting up a node and contacting a Puppet Master somewhere?

glarizza avatar Feb 11 '14 03:02 glarizza

@glarizza I have to admit to being a bit of a Ruby noob. I'm using Boxen to manage my system, and was hoping to use puppet-property_list_key as a plist manager for various settings. Bluetooth in this case.

This: https://github.com/scimusmn/boxen/blob/4698247d31f1d697b6f8815672ae7e2feedff817/Puppetfile#L134

Combined with this: https://github.com/scimusmn/boxen/blob/9fe952fd43b3898baee1f7e5813df3a5fd53ab96/manifests/site.pp#L199

...was working great for me on my non-Mavericks systems.

However, I was getting errors on the Mavericks systems. I wasn't exactly sure which CFPropertyList update command to run, so I tried the first. But I still didn't have any success. The system kept telling me it couldn't track down CFPropertyList. I figured that it might be the result of an OS X case issue, since I've had that same issue on some other OS X things before.

Do you have any suggestions for how to improve my Boxen specific setup re: puppet-property_list_key

bryankennedy avatar Feb 11 '14 03:02 bryankennedy

@bryankennedy Sure, would love to help :) Edit the Gemfile in the root of your Boxen repository and add this line:

gem 'CFPropertyList',         '>= 2.2.6'

Boxen will automatically consult the Gemfile, pull down CFPropertyList at that version, and then roll along. That should solve your problem - let me know if you're still having issues :)

glarizza avatar Feb 11 '14 04:02 glarizza

I should absolutely add a line in the README for Boxen Users

glarizza avatar Feb 11 '14 04:02 glarizza

@glarizza understood... yeah I think most people found this module because of boxen so they probably won't be using puppet master and will be using Bundler... thanks for the help... with that line I was finally able to get everything fully up :)

cdenneen avatar Feb 11 '14 04:02 cdenneen

Very cool - updated my readme with commit 61edc2b Thanks for the info guys!

glarizza avatar Feb 11 '14 04:02 glarizza

Thanks for the update.

I modified my Gemfile, but now Boxen is complaining about the lockfile being out of date with the Gem. Error text below

$ boxen
Boxen is up-to-date.
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

You have added to the Gemfile:
* CFPropertyList (>= 2.2.6)
Can't bootstrap, dependencies are outdated.

Should I download the source for puppet-property_list_key, run bundle in there, and then copy over the Gemfile.lock file? It seems like that would be out of sync with the Python dependencies. Let me know if this is more of an issue for the Boxen threads.

bryankennedy avatar Feb 11 '14 14:02 bryankennedy

@bryankennedy no... what you end up having to do is go to your boxen repository, run bundle update, commit changes to your repo, push to origin... re-run boxen.

cdenneen avatar Feb 11 '14 16:02 cdenneen

Nice! That worked. Thank @cdenneen.

I was thrown by the boxen messages that recommended running bundle update elsewhere


@glarizza - If you wanted to make the Readme ruby-idiot proof, then you could do something like this.

  • For Boxen Users, add the following to the Gemfile in the root of your Boxen repository:
gem 'CFPropertyList',         '>= 2.2.6'

Then run bundle update in your Boxen directory, with the no-deployment flag:

$ cd /opt/boxen/repo
$ bundle install --no-deployment

Commit these changes, push to origin, then re-run boxen.

bryankennedy avatar Feb 11 '14 17:02 bryankennedy

Can confirm this is still an issue. The name of the gem is CFPropertyList, but the file to require is cfpropertylist.

Also to ensure the Gemfile works via autorequiring via Bundler.require, you probably want to do one of the following:

gem "CFPropertyList", require: false
gem "CFPropertyList", require: ["cfpropertylist"]

joshcooper avatar Jul 16 '19 18:07 joshcooper