[jekyll] 乱码问题invalid byte sequence in GB2312
2014-05-05 22:56
337 查看
这里是windows下 使用1.4.3版本时候出现的问题。
问题1
I:\git\orangle.github.io>jekyll serve --watch
Configuration file: I:/git/orangle.github.io/_config.yml
Source: I:/git/orangle.github.io
Destination: I:/git/orangle.github.io/_site
Generating... Error reading file I:/git/orangle.github.io/_layouts/default
.html: invalid byte sequence in GB2312
Error reading file I:/git/orangle.github.io/_layouts/index.html: invalid byte se
quence in GB2312
Error reading file I:/git/orangle.github.io/_layouts/post.html: invalid byte seq
uence in GB2312
Error reading file I:/git/orangle.github.io/_posts/2013-12-28-Cracking-the-Codin
g-Interview-1-3.md: invalid byte sequence in GB2312
error: invalid byte sequence in GB2312. Use --trace to view backtrace
网上查到配置.bash_profile方法,然后 不好用,修改jekyll代码的方式应该是比较老的版本,新版本有点不一样,由于ruby不熟悉就没尝试。
问题2
这使用在命令行设置环境变量的办法
I:\git\orangle.github.io>set LC_ALL=en_US.UTF-8
I:\git\orangle.github.io>set LANG=en_US.UTF-8
I:\git\orangle.github.io>jekyll serve
Configuration file: I:/git/orangle.github.io/_config.yml
Source: I:/git/orangle.github.io
Destination: I:/git/orangle.github.io/_site
Generating... D:/devsofts/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3
.8/lib/posix/spawn.rb:162: warning: cannot close fd before spawn
'which' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error: Invalid argument - I:/git/orangle.github.io/_site/I:. Use --trace to view
backtrace
这次找到的答案是修改jekyll版本
gem uninstall jekyll
gem install jekyll --version "=1.4.2"
最后还是会有错,但是可以启动服务了。
I:\git\orangle.github.io>jekyll server
Configuration file: I:/git/orangle.github.io/_config.yml
Source: I:/git/orangle.github.io
Destination: I:/git/orangle.github.io/_site
Generating... D:/devsofts/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3
.8/lib/posix/spawn.rb:162: warning: cannot close fd before spawn
'which' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
done.
Server address: http://0.0.0.0:4000 Server running... press ctrl-c to stop.
问题1
I:\git\orangle.github.io>jekyll serve --watch
Configuration file: I:/git/orangle.github.io/_config.yml
Source: I:/git/orangle.github.io
Destination: I:/git/orangle.github.io/_site
Generating... Error reading file I:/git/orangle.github.io/_layouts/default
.html: invalid byte sequence in GB2312
Error reading file I:/git/orangle.github.io/_layouts/index.html: invalid byte se
quence in GB2312
Error reading file I:/git/orangle.github.io/_layouts/post.html: invalid byte seq
uence in GB2312
Error reading file I:/git/orangle.github.io/_posts/2013-12-28-Cracking-the-Codin
g-Interview-1-3.md: invalid byte sequence in GB2312
error: invalid byte sequence in GB2312. Use --trace to view backtrace
网上查到配置.bash_profile方法,然后 不好用,修改jekyll代码的方式应该是比较老的版本,新版本有点不一样,由于ruby不熟悉就没尝试。
问题2
这使用在命令行设置环境变量的办法
I:\git\orangle.github.io>set LC_ALL=en_US.UTF-8
I:\git\orangle.github.io>set LANG=en_US.UTF-8
I:\git\orangle.github.io>jekyll serve
Configuration file: I:/git/orangle.github.io/_config.yml
Source: I:/git/orangle.github.io
Destination: I:/git/orangle.github.io/_site
Generating... D:/devsofts/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3
.8/lib/posix/spawn.rb:162: warning: cannot close fd before spawn
'which' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error: Invalid argument - I:/git/orangle.github.io/_site/I:. Use --trace to view
backtrace
这次找到的答案是修改jekyll版本
gem uninstall jekyll
gem install jekyll --version "=1.4.2"
最后还是会有错,但是可以启动服务了。
I:\git\orangle.github.io>jekyll server
Configuration file: I:/git/orangle.github.io/_config.yml
Source: I:/git/orangle.github.io
Destination: I:/git/orangle.github.io/_site
Generating... D:/devsofts/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3
.8/lib/posix/spawn.rb:162: warning: cannot close fd before spawn
'which' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
done.
Server address: http://0.0.0.0:4000 Server running... press ctrl-c to stop.
相关文章推荐
- 关于使用gulp压缩sass中文乱码问题:Invalid US-ASCII character "\xE5") Compilation failed in 1 files.
- windows下运行python爬虫脚本乱码问题,IOError: [Errno 22] Invalid argument
- jekyll中文乱码问题
- Ubuntu 8.04 9.04 9.10 Flash中文字体乱码问题解决
- (2010.-06-05)Oracle问题之EM乱码的解决方法
- 解决lynx浏览中文网页乱码问题
- win7系统下DB2乱码问题,菜单栏出现方框
- 解决JSP中文乱码问题
- java程序向mysql写入数据乱码问题
- java乱码问题解决
- xshell或secureCRT的中文乱码问题
- 常见乱码问题解决
- 处理Cocos2dx乱码问题
- mysql数据库中文乱码问题!!
- 关于javascript URL 传递参数乱码的问题及解决方案。
- Android中Http请求中问乱码问题解决
- Extjs中url传递中文乱码有关问题
- Ubuntu16.4kylin 安装 teamviewer12乱码问题
- 【javaweb:Servlet】解决Servlet页面输出中文乱码问题
- Ruby on Rails 学习:解决中文乱码问题