Warning with fog and AWS: unable to load the 'unf' gem

Solution 1:

Yes, this just happened a few days ago. You can see from the pull request and commit that the unf dependency is optional.

https://github.com/fog/fog/pull/2320/commits

When I updated my current bundle with fog I received the same warnings, and adding

gem 'unf' 

does indeed remove the warning without any issues.

Solution 2:

If you do not have any S3 buckets/objects that would have not ASCII characters in the names, I think you can safely disregard the warning. We may do something to make it less noisy also, but for now you can ignore or add unf to quiet it down, as @trh pointed out.

Solution 3:

I apparently had fog-1.18.0 installed when I saw this error. (Restarting an aws vagrant project I installed a while ago) My naive attempt at a fix was to start with an upgrade

  gem install fog

which upgraded something to fog-1.21.0. As it warned, "This could take a while..." ... and that did not help.

Exactly WHERE to add "gem 'unf'" wasn't clear from the solution voted up here, it seemed to be lib/fog/aws.rb but that was already there when I looked.

  gem install unf

appeared to add it somewhere, but the problem did not go away.

I upgraded vagrant itself (1.4.3 to 1.5.1) and THAT didn't fix it.

Eventually, the fix was

  vagrant plugin install unf

as I found in a thread at https://github.com/mitchellh/vagrant/issues/2507

I'm not sure if any of my previous fumbling attempts were also necessary, so I noted them here anyway.