jekyll / jekyll-sitemap

Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site
http://rubygems.org/gems/jekyll-sitemap
MIT License
949 stars 134 forks source link

Error "incompatible character encodings: UTF-8 and ASCII-8BIT" #219

Closed manuel-mauky closed 5 years ago

manuel-mauky commented 5 years ago

I get the following error when I try to use this gem:

...
Fetching jekyll-sitemap 1.2.0
Installing jekyll-sitemap 1.2.0
Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
An error occurred while installing jekyll-sitemap (1.2.0), and Bundler cannot continue.
Make sure that `gem install jekyll-sitemap -v '1.2.0' --source 'https://rubygems.org/'` succeeds before bundling.

bundle env says:

Bundler       1.16.2
  Platforms   ruby, universal-darwin-17
Ruby          2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
  Full Path   /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
  Config Dir  /Library/Ruby/Site
RubyGems      2.5.2
  Gem Home    §HOME/gems
  Gem Path    /Users/manuel/.gem/ruby/2.3.0:/Library/Ruby/Gems/2.3.0:§HOME/gems:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0
  User Path   /Users/manuel/.gem/ruby/2.3.0
  Bin Dir     §HOME/gems/bin
Tools
  Git         2.15.2 (Apple Git-101.1)
  RVM         not installed
  rbenv       not installed
  chruby      not installed

Any idea what could be wrong?

jekyllbot commented 5 years ago

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

Vonfry commented 5 years ago

Hello, I have the same problem only happened using bundle, which means I can install the package by gem but failed by bundle.

Error info:

Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
An error occurred while installing jekyll-sitemap (1.2.0), and Bundler cannot continue.
Make sure that `gem install jekyll-sitemap -v '1.2.0' --source 'https://rubygems.org/'` succeeds before bundling.

I try to run gem install jekyll-sitemap -v '1.2.0' --source 'https://rubygems.org/', and it is success.

Then, I try bundle install again, failed as well.

bundle env is here.

Bundler       2.0.1
  Platforms   ruby, x86_64-darwin-18
Ruby          2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
  Full Path   /usr/local/opt/ruby/bin/ruby
  Config Dir  /usr/local/Cellar/ruby/2.6.0/etc
RubyGems      3.0.2
  Gem Home    /usr/local/lib/ruby/gems/2.6.0
  Gem Path    /Users/vonfry/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/Cellar/ruby/2.6.0/lib/ruby/gems/2.6.0
  User Path   /Users/vonfry/.gem/ruby/2.6.0
  Bin Dir     /usr/local/lib/ruby/gems/2.6.0/bin
Tools
  Git         2.20.1
  RVM         not installed
  rbenv       rbenv 1.1.1
  chruby      not installed

By the way, if I try to build in a docker container, it is success.

Vonfry commented 5 years ago

If I removed bundle config about BUNDLE_PATH, installation successes.