【发布时间】:2016-10-01 16:36:27
【问题描述】:
我按照Jekyll中的所有说明进行操作:
gem install jekyll bundler
jekyll new my-awesome-site
cd my-awesome-site
bundle install
bundle exec jekyll serve
然后,当我浏览到http://localhost:4000 时,会出现一个空白页面,并且命令提示符中出现以下错误:
Error reading file C:/Ruby23/lib/ruby/gems/2.3.0/gems/minima-1.2.0/_layouts/default.html: No such file or directory @ rb_sysopen - /Ruby23/lib/ruby/gems/2.3.0/gems/minima-1.2.0/_layouts/default.html
Error reading file C:/Ruby23/lib/ruby/gems/2.3.0/gems/minima-1.2.0/_layouts/page.html: No such file or directory @ rb_sysopen - /Ruby23/lib/ruby/gems/2.3.0/gems/minima-1.2.0/_layouts/page.html
Error reading file C:/Ruby23/lib/ruby/gems/2.3.0/gems/minima-1.2.0/_layouts/post.html: No such file or directory @ rb_sysopen - /Ruby23/lib/ruby/gems/2.3.0/gems/minima-1.2.0/_layouts/post.html
发生这种情况是因为我在分区 D: 中使用 Jekyll,而 Ruby 安装在分区 C: 中。事实上,如果我将所有项目安装在一个分区中,则不会出现错误,但我更喜欢将所有项目保留在分区 D: 中。我相信问题出在rb_sysopen。
有什么解决办法吗?谢谢。
这是我Gemfile.lock的一部分:
PLATFORMS
- x86-mingw32
DEPENDENCIES
- jekyll (= 3.2.1)
- minima
RUBY VERSION
- ruby 2.3.1p112
BUNDLED WITH
- 1.13.2
【问题讨论】: