Infraestrutura Ágil

Soluções e métodos inteligentes para sua infra

Octopress invalid byte sequence

| Comments

Após reinstalar meu mavericks, eu me deparei com um problema estranho ao rodar rake generate no octopress, veja abaixo o erro.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
jekyll/convertible.rb:29:in `read_yaml': invalid byte sequence in US-ASCII (ArgumentError)
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/gems/jekyll-0.11.2/lib/jekyll/post.rb:39:in `initialize'
  from /Users/gutocarvalho/Dropbox/@github/blog/plugins/preview_unpublished.rb:23:in `new'
  from /Users/gutocarvalho/Dropbox/@github/blog/plugins/preview_unpublished.rb:23:in `block in read_posts'
  from /Users/gutocarvalho/Dropbox/@github/blog/plugins/preview_unpublished.rb:21:in `each'
  from /Users/gutocarvalho/Dropbox/@github/blog/plugins/preview_unpublished.rb:21:in `read_posts'
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/gems/jekyll-0.11.2/lib/jekyll/site.rb:128:in `read_directories'
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/gems/jekyll-0.11.2/lib/jekyll/site.rb:98:in `read'
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/gems/jekyll-0.11.2/lib/jekyll/site.rb:38:in `process'
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/gems/jekyll-0.11.2/bin/jekyll:250:in `<top (required)>'
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/bin/jekyll:23:in `load'
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/bin/jekyll:23:in `<main>'
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `eval'
  from /Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `<main>'

Por alguma razão o meu locale estava setado para C.

1
2
3
4
5
6
7
8
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

Fiz um ajuste para en_US.UTF-8

export LC_CTYPE=en_US.UTF-8

Tentei novamente

rake generate

Acompanhe a saída

1
2
3
4
5
6
## Generating Site with Jekyll
unchanged sass/screen.scss
/Users/gutocarvalho/.rvm/gems/ruby-1.9.3-p547/gems/maruku-0.6.0/lib/maruku/input/parse_doc.rb:22:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
Configuration from /Users/gutocarvalho/Dropbox/@github/blog/_config.yml
Building site: source -> public/octopress
Successfully generated site: source -> public/octopress

E o problema foi solucionado, fica a dica!

Referências

  • https://github.com/imathis/octopress/issues/144

[s]
Guto

Comments