Skip to content

Instantly share code, notes, and snippets.

@glauco
Created June 29, 2012 19:42
Show Gist options
  • Save glauco/3020212 to your computer and use it in GitHub Desktop.
Save glauco/3020212 to your computer and use it in GitHub Desktop.
Corrigindo problemas de locale no Jekyll

Ao executar o Jekyll estava recebendo o seguinte erro:

/Users/glauco/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
Configuration from /Users/glauco/Github/glauco.github.com/_config.yml
Building site: . -> ./_site
/Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/convertible.rb:29:in `read_yaml': invalid byte sequence in US-ASCII (ArgumentError)
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/layout.rb:31:in `initialize'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:113:in `new'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:113:in `block in read_layouts'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:111:in `each'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:111:in `read_layouts'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:97:in `read'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:38:in `process'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/bin/jekyll:250:in `<top (required)>'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/bin/jekyll:19:in `load'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/bin/jekyll:19:in `<main>'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

Depois de passar algum tempo pesquisando, descobri que exportar o locale correto era o suficiente para resolver o problema:

export LC_CTYPE=en_US.UTF-8
export LANG=en_US.UTF-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment