1

现在我正在尝试在 Windows 系统上使用Octopress。当我写博客并运行时

bundle exec rake generate

我得到了这些错误:

user@USER-PC /c/Sites/my_project (master)
$ bundle exec rake generate
## Generating Site with Jekyll
unchanged sass/screen.scss
Configuration from c:/Sites/my_project/_config.yml
Building site: source -> public
c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/convertible.rb:29:i
n `read_yaml': invalid byte sequence in GBK (ArgumentError)
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/post.r
b:39:in `initialize'
        from c:/Sites/my_project/plugins/preview_unpublished.rb:23:in `new'
        from c:/Sites/my_project/plugins/preview_unpublished.rb:23:in `block
 in read_posts'
        from c:/Sites/my_project/plugins/preview_unpublished.rb:21:in `each'

        from c:/Sites/my_project/plugins/preview_unpublished.rb:21:in `read_
posts'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/site.r
b:128:in `read_directories'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/site.r
b:98:in `read'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/lib/jekyll/site.r
b:38:in `process'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.11.0/bin/jekyll:250:in
 `<top (required)>'
        from c:/Ruby193/bin/jekyll:19:in `load'
        from c:/Ruby193/bin/jekyll:19:in `<main>'

user@USER-PC /c/Sites/my_project (master)
$

好像编码不对,怎么改?

4

1 回答 1

1

请设置LC_ALLLANG

set LC_ALL=en_US.UTF-8
set LANG=en_US.UTF-8
于 2012-10-01T02:09:46.740 回答