ruby - githubpages+jekyll搭建个人博客 再jekyll s时遇到问题

浏览:41日期:2022-10-14

问题描述

1.想做个个人博客,装了git、ruby、gem、jekyll装jekyll的过程:

gem install jekyllcd d:websitejekyll new mywebjekyll serve

fork了别人的一个博客,运行

jekyll serve

出现了以下错误:

D:/softwares/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:95:in `block in materialize’: Could not find RedCloth-4.2.9 in any of the sources (Bundler::GemNotFound)

但是奇怪的是,从gem list中查看,我已经装了redcloth。gem list

bigdecimal (default: 1.2.6)bundler (1.12.5)colorator (1.1.0)directory_watcher (1.5.1)ffi (1.9.14 x64-mingw32)forwardable-extended (2.6.0)io-console (default: 0.4.3)jekyll (3.2.1)jekyll-paginate (1.1.0)jekyll-sass-converter (1.4.0)jekyll-watch (1.5.0)json (default: 1.8.1)kramdown (1.12.0, 0.13.8)liquid (3.0.6, 2.4.1)listen (3.0.8)mercenary (0.3.6)minitest (5.4.3)pathutil (0.14.0)power_assert (0.2.2)psych (default: 2.0.8)rake (default: 10.4.2)rb-fsevent (0.9.7)rb-inotify (0.9.7)rdiscount (2.2.0.1)rdoc (default: 4.2.0)RedCloth (4.3.2)rouge (1.11.1)rubygems-update (2.6.6)safe_yaml (1.0.4)sass (3.4.22)syntax (1.0.0)test-unit (3.0.8)

对git和ruby不是很了解,也不知道是不是配置的顺序有错误,但是很想自己做个博客。实在不知道怎么解决了,请教各位大神。

系统:win 10

ruby:2.2.5

bundler 1.12.5

gem 2.6.6

问题解答

回答1:

我也装了bundle的。我转用hexo啦。在用hexo的过程中发现,在浏览器中输入localhost:4000没反应可能是因为端口被占用。谢谢各位啦。

回答2:

bundle install

回答3:

我之前遇到jekyll serve不能运行,但是是jekyll-paginate的问题,然后Google了一下,转载了这篇文章 https://dotos.github.io/jekyl...

用bundle解决的

# 1.如果没有安装bundlegem install bundle# 2.jekyll-blog目录创建Gemfile文件,内容参考链接# 3.运行bundle,安装Gemfile里的插件(姑且叫插件吧,我也不知道叫啥~_~!)bundle install # 4.打开服务bundle exec jekyll serve# orjekyll serve

相关文章: