Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Every action in a rails console (rails server, rails console, db:migrate, etc.) raises a warning since my last bundle update:

[fog][WARNING] Unable to load the 'unf' gem. Your AWS strings may not be properly encoded.

I'm sure I didn't change anything in the AWS strings which are in my application.rb file:

    # Amazon S3 credentials
ENV["AWS_ACCESS_KEY_ID"] = "AWS_ACCESS_KEY_ID"
ENV["AWS_SECRET_ACCESS_KEY"] = "AWS_SECRET_ACCESS_KEY"
ENV["AWS_S3_BUCKET"] = "my-bucket"

I don't have this "unf" gem in my gemfile. Should I add it?

like image 458
Arnlen Avatar asked Oct 29 '13 18:10

Arnlen


2 Answers

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.

like image 56
trh Avatar answered Oct 30 '22 21:10

trh


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.

like image 13
geemus Avatar answered Oct 30 '22 21:10

geemus