Octopress in Windows

- - posted in octopress

终于搞定了windows下安装octopress

真是折磨人。简单写写,参考之前写的。

先是安装git,在msysgit(https://github.com/msysgit/msysgit/releases)下载win版git,安的时候选择添加到系统path。

然后克隆下源码

    git clone git://github.com/imathis/octopress.git octopress  
    cd octopress  

安装ruby1.9.3,(http://rubyinstaller.org)同样添加到path。并且下载相同版本dev,解压后打开msys.bat,进入之前octopress的文件夹。

安装依赖

    gem install bundler  
    bundle install  

找个主题安装,谷歌即可。然后安装
如果默认主题,使用

    rake install  

如果出现提示Set the codepage to 65001 for Windows machines.

根据老外的文章,在octopress文件夹下

    gem install jekyll -v 2.1.0  

编辑Gemfile为

    gem 'jekyll', '2.1.0'  

然后

    bundle install  
    bundle update jekyll  

最后编辑Rakefile,去掉如下字样

    if (/cygwin ...  
      puts '## Set the codepage to 65001 for windows machines'  
      'chcp 65001'  
    end