如何在windows上安装并使用slate

Python017

如何在windows上安装并使用slate,第1张

1.安装ruby

下载 rubyinstaller

双击 rubyinstaller-2.3.3.exe 安装

安装过程使用默认配置

添加ruby环境变量到Path

2.安装DevKit

点击下载 DevKit

双击附件中 DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe 解压到 C:\DevKit\

然后执行以下命令

C:\>cd C:\DevKit

C:\DevKit>ruby dk.rb init

C:\DevKit>ruby dk.rb install123123

3.安装node.js

点击下载 node.js

双击 node-v6.10.3-x86.msi 安装

安装过程使用默认配置

这里会自动配置环境变量

安装成功后重启命令行,输入以下命令

node -v11

返回 v6.10.3 表示安全成功

4.搭建slate环境

点击下载slate

cd 到slate目录

注意:slate目录整个路径中请不要有中文,否则会报错

修改Gemfile,添加下面一行

gem 'wdm', '>= 0.1.0'11

执行以下命令

gem install bundler

bundle install1212

5.启动slate

bundle exec middleman server11

6.预览md页面

打开浏览器输入 http://127.0.0.1:4567/ 可以看到一个slate示例页面

7.使用md生成静态页面

使用以下命令生成

bundle exec middleman build --clean11

8.以上已在Windows7上测试通过

如题,使用xcode9.3后新建工程,然后初始化pod init,结果报错:

报错信息

pod init

――― MARKDOWN TEMPLATE ――――――

### Command

```

/usr/local/bin/pod init

```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?

### Stack

```

   CocoaPods : 1.3.1

        Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]

    RubyGems : 2.6.14

        Host : Mac OS X 10.13.4 (17E202)

       Xcode : 9.3 (9E145)

         Git : git version 2.15.1 (Apple Git-101)

Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib

Repositories : master - https://github.com/CocoaPods/Specs.git @ 8e9a8f04aa2579345661be7afc6f6fafdfb09d51

               PrivatePods - https://github.com/ModulizationDemo/PrivatePods.git @ 22ad9a433c6e02afeef4d32da95ba0fe64799a0d

```

### Plugins

```

cocoapods-deintegrate : 1.0.1

cocoapods-plugins    : 1.0.0

cocoapods-search      : 1.0.0

cocoapods-stats      : 1.0.0

cocoapods-trunk      : 1.3.0

cocoapods-try        : 1.1.0

```

### Error

```

RuntimeError - [Xcodeproj] Unknown object version.

/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:217:in `initialize_from_file'

/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:102:in `open'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command/init.rb:41:in `validate!'

/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/bin/pod:55:in `'

/usr/local/bin/pod:23:in `load'

/usr/local/bin/pod:23:in `'

```

――― TEMPLATE END ―――

'''

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:

https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Unknown+object+version.&type=Issues

If none exists, create a ticket, with the template displayed above, on:

https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:

https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

 - RuntimeError - [Xcodeproj] Unknown object version.