Octopress 之 Mac 版环境配置

前提条件:

1.安装了 Git
2.用 rbenv 或 RVM 安装了 Ruby 1.9.3 以上版本
3.安装了 ExecJS 的一种支持 JavaScript 运行环境

一、安装 Octopress

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

2 cd octopress

二、安装依赖

1 gem install bundler2 bundle install

遇到问题

Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/gems/tilt-2.0.1.gem)
An error occurred while installing tilt (2.0.1), and Bundler cannot continue.
Make sure that `gem install tilt -v '2.0.1'` succeeds before bundling.

安装 tilt

gem install tilt -v '2.0.1'

再次执行

bundle install

遇到问题

Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/gems/jekyll-watch-1.2.1.gem)
An error occurred while installing jekyll-watch (1.2.1), and Bundler cannot continue.
Make sure that `gem install jekyll-watch -v '1.2.1'` succeeds before bundling.

安装 tilt

gem install jekyll-watch -v '1.2.1'

再次执行

bundle install

三、安装默认的 Octopress 主题

rake install

四、部署

heroku 上进行部署

安装 heroku

gem install heroku

创建 heroku app

heroku create

发布到 heroku

1 rake generate

2 git add .

3 git commit -m 'site updated'

4 git push heroku master

 

你可能感兴趣的:(环境配置)