我在Windows上的ubuntu 18.04.2 LTS上,我有一个基本的问题。我的目标是使用github模板https://github.com/github/personal-website并将其发布到username.github.io
我在第4步中遇到问题:
构建站点并使其在本地服务器上可用
bundle exec jekyll serve
hafidz@LAMBDA05:~/personal-website$ bundle exec jekyll serve
**Could not find nokogiri-1.10.1 in any of the sources**
Run `bundle install` to install missing gems.
安装bundle,jekyll和nokogori已经是一种解决方法,但是我认为已经做到了。是否需要设置路径?
hafidz@LAMBDA05:~/personal-website$ bundle -v
Bundler version 2.0.1
hafidz@LAMBDA05:~/personal-website$ jekyll -v
Traceback (most recent call last):
12: from /usr/local/bin/jekyll:23:in `<main>'
11: from /usr/local/bin/jekyll:23:in `load'
10: from /var/lib/gems/2.5.0/gems/jekyll-3.8.5/exe/jekyll:11:in `<top (required)>'
9: from /var/lib/gems/2.5.0/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
8: from /var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler.rb:107:in `setup'
7: from /var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:20:in `setup'
6: from /var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:108:in `block in definition_method'
5: from /var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/definition.rb:226:in `requested_specs'
4: from /var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/definition.rb:237:in `specs_for'
3: from /var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/definition.rb:170:in `specs'
2: from /var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/spec_set.rb:81:in `materialize'
1: from /var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/spec_set.rb:81:in `map!'
/var/lib/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find nokogiri-1.10.1 in any of the sources (Bundler::GemNotFound)
hafidz@LAMBDA05:~/personal-website$ nokogiri -v
# Nokogiri (1.10.1)
---
warnings: []
nokogiri: 1.10.1
ruby:
version: 2.5.3
platform: x86_64-linux-gnu
description: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux-gnu]
engine: ruby
libxml:
binding: extension
source: packaged
libxml2_path: "/var/lib/gems/2.5.0/gems/nokogiri-1.10.1/ports/x86_64-pc-linux-gnu/libxml2/2.9.9"
libxslt_path: "/var/lib/gems/2.5.0/gems/nokogiri-1.10.1/ports/x86_64-pc-linux-gnu/libxslt/1.1.33"
libxml2_patches:
- 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
libxslt_patches: []
compiled: 2.9.9
loaded: 2.9.9
感谢帮助
答案 0 :(得分:0)
我使用Ubuntu WSL看到了类似的东西。我一直在关注Jekyll WSL instructions并被卡住。戴夫·鲁珀特(Dave Rupert)的博客(link)上有一个很好的提示,它推荐了以下内容,并阻止了我:apt install zlibc zlib1g-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev
以下是该会话的bash历史记录的转储:
24 sudo apt install ruby
26 gem update jekyll
27 code .
28 sudo apt-get update -y && sudo apt-get upgrade -y
30 sudo gem update
31 sudo apt-add-repository ppa:brightbox/ruby-ng
32 sudo apt-get update
33 sudo apt-get install ruby2.5 ruby2.5-dev build-essential dh-autoreconf
35 sudo gem update
37 sudo gem install jekyll bundler
38 jekyll -v
40 sudo bundle update
45 sudo bundle install
47 sudo apt install zlibc zlib1g-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev
48 sudo gem install nokogiri -v '1.8.2' --source 'https://rubygems.org/'
49 sudo bundle install
51 bundle exec jekyll -v
52 bundle exec jekyll serve
54 sudo bundle update
56 bundle exec jekyll serve
57 history
58 history > history.txt