如何降级 jekyll 以使用 github 页面?

2024-01-10

我认为我的主要问题是 github 页面不支持 jekyll 4。这对我来说没问题,但是无论如何我如何降级 jekyll 才能工作呢?

我尝试按照此处的说明进行操作:https://github.com/github/pages-gem/issues/577 https://github.com/github/pages-gem/issues/577

这基本上似乎建议使用旧版本的 jekyll。我同意这样做,但似乎捆绑拒绝服从我,我不知道为什么,或者我陷入了一个无法摆脱的奇怪循环。

所以我得到的主要错误是:

$ bundle
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
You have requested:
  jekyll ~> 3.8.5

The bundle currently has jekyll locked at 4.0.0.
Try running `bundle update jekyll`

If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`

但似乎我被锁定为 4。我尝试解锁,但似乎无法正常工作。我最近的尝试如下:

$ gem install jekyll -v 3.8.5
Fetching kramdown-1.17.0.gem
Fetching jekyll-3.8.5.gem
Fetching sass-listen-4.0.0.gem
Fetching sass-3.7.4.gem
Fetching jekyll-sass-converter-1.5.2.gem
Fetching i18n-0.9.5.gem
Successfully installed kramdown-1.17.0
Successfully installed sass-listen-4.0.0

Ruby Sass has reached end-of-life and should no longer be used.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  https://sass-lang.com/blog/posts/7828841

Successfully installed sass-3.7.4
Successfully installed jekyll-sass-converter-1.5.2
Successfully installed i18n-0.9.5
Successfully installed jekyll-3.8.5
Parsing documentation for kramdown-1.17.0
Installing ri documentation for kramdown-1.17.0
Parsing documentation for sass-listen-4.0.0
Installing ri documentation for sass-listen-4.0.0
Parsing documentation for sass-3.7.4
Installing ri documentation for sass-3.7.4
Parsing documentation for jekyll-sass-converter-1.5.2
Installing ri documentation for jekyll-sass-converter-1.5.2
Parsing documentation for i18n-0.9.5
Installing ri documentation for i18n-0.9.5
Parsing documentation for jekyll-3.8.5
Installing ri documentation for jekyll-3.8.5
Done installing documentation for kramdown, sass-listen, sass, jekyll-sass-converter, i18n, jekyll after 8 seconds
6 gems installed

但当我尝试捆绑我的Gemfile使用命令bundle我收到以下错误:

$ gem install jekyll -v 3.8.5
Fetching kramdown-1.17.0.gem
Fetching jekyll-3.8.5.gem
Fetching sass-listen-4.0.0.gem
Fetching sass-3.7.4.gem
Fetching jekyll-sass-converter-1.5.2.gem
Fetching i18n-0.9.5.gem
Successfully installed kramdown-1.17.0
Successfully installed sass-listen-4.0.0

Ruby Sass has reached end-of-life and should no longer be used.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  https://sass-lang.com/blog/posts/7828841

Successfully installed sass-3.7.4
Successfully installed jekyll-sass-converter-1.5.2
Successfully installed i18n-0.9.5
Successfully installed jekyll-3.8.5
Parsing documentation for kramdown-1.17.0
Installing ri documentation for kramdown-1.17.0
Parsing documentation for sass-listen-4.0.0
Installing ri documentation for sass-listen-4.0.0
Parsing documentation for sass-3.7.4
Installing ri documentation for sass-3.7.4
Parsing documentation for jekyll-sass-converter-1.5.2
Installing ri documentation for jekyll-sass-converter-1.5.2
Parsing documentation for i18n-0.9.5
Installing ri documentation for i18n-0.9.5
Parsing documentation for jekyll-3.8.5
Installing ri documentation for jekyll-3.8.5
Done installing documentation for kramdown, sass-listen, sass, jekyll-sass-converter, i18n, jekyll after 8 seconds
6 gems installed

好的,我会尝试更新,我会的bundle update:

$ bundle update
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Bundler could not find compatible versions for gem "jekyll":
  In Gemfile:
    github-pages was resolved to 4, which depends on
      jekyll (= 1.1.2)

    jekyll-feed (~> 0.12) was resolved to 0.12.1, which depends on
      jekyll (>= 3.7, < 5.0)

Bundler could not find compatible versions for gem "jekyll-feed":
  In Gemfile:
    github-pages was resolved to 36, which depends on
      jekyll-feed (= 0.2.3)

    minima (~> 2.5) was resolved to 2.5.0, which depends on
      jekyll-feed (~> 0.9)

Bundler could not find compatible versions for gem "tzinfo":
  In Gemfile:
    tzinfo (~> 1.2)

    tzinfo-data was resolved to 1.2019.3, which depends on
      tzinfo (>= 1.0.0)

这让我陷入困境......有什么想法该怎么做吗?

我也尝试按照我的说明进行操作Gemfile没有成功:

$ bundle update github-pages
Could not find gem 'github-pages'.

通过运行他们所说的命令,我收到错误:

$ bundle update github-pages
Could not find gem 'github-pages'.

我也跑了这个bundle install:

$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "jekyll-feed":
  In snapshot (Gemfile.lock):
    jekyll-feed (= 0.12.1)

  In Gemfile:
    github-pages was resolved to 36, which depends on
      jekyll-feed (= 0.2.3)

    minima (~> 2.5) was resolved to 2.5.1, which depends on
      jekyll-feed (~> 0.9)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "kramdown":
  In snapshot (Gemfile.lock):
    kramdown (= 2.1.0)

  In Gemfile:
    github-pages was resolved to 8, which depends on
      kramdown (= 1.0.2)

    minima (~> 2.5) was resolved to 2.5.1, which depends on
      jekyll-feed (~> 0.9) was resolved to 0.12.1, which depends on
        jekyll (>= 3.7, < 5.0) was resolved to 4.0.0, which depends on
          kramdown (~> 2.1)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "minima":
  In snapshot (Gemfile.lock):
    minima (= 2.5.1)

  In Gemfile:
    minima (~> 2.5)

    github-pages was resolved to 94, which depends on
      minima (= 1.0.1)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

我也做了:

gem install github-pages

安装了...不确定这是否会让事情变得更糟...


我用来帮助我的资源:

  • https://github.com/github/pages-gem/issues/577 https://github.com/github/pages-gem/issues/577
  • https://github.com/github/pages-gem/issues/555 https://github.com/github/pages-gem/issues/555
  • https://talk.jekyllrb.com/t/unlock-bundle-from-jekyll-version/3508 https://talk.jekyllrb.com/t/unlock-bundle-from-jekyll-version/3508
  • 如何安装旧版本的 Jekyll? https://stackoverflow.com/questions/24223567/how-can-i-install-an-older-version-of-jekyll
  • https://github.com/github/pages-gem/issues/651 https://github.com/github/pages-gem/issues/651
  • https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll#creating-your-site https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll#creating-your-site

但还没有人解决我的问题。


Your Gemfile应该看起来像:

source 'https://rubygems.org'

# will install all gh-pages allowed gems
# see : https://pages.github.com/versions/
gem 'github-pages'

# comment out all other gems
# gem 'jekyll'
# gem 'jekyll-feed'
# gem ...

Remove Gemfile.lock

您现在可以做一个bundle它将安装所有需要的 gems 以针对实际的 github-pages 版本进行测试。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何降级 jekyll 以使用 github 页面? 的相关文章

  • Ruby 动态变量名

    有没有办法在 Ruby 中创建具有动态名称的变量 我正在读取一个文件 当我找到一个字符串时 会生成一个哈希值 e g file File new games log r file lines do l l split do p if p 1
  • rake db 问题:迁移 -

    我无法为 Ruby on Rails 设置 MySQL 数据库 设置数据库并确保 config database yml 文件匹配后 我遇到了以下错误消息 U Rails alpha gt rake db migrate trace in
  • 如何将文件的元素放入哈希中? -红宝石

    所以我有一个以下形式的文件 Key1 Value1 Key2 Value2 Key3 Value3 用制表符分隔 我的问题是如何打开这个文件并将其放入哈希中 我曾尝试这样做 fp File open file path fp each do
  • 如何在 mongoid 中使用 or 条件进行查询

    如何在 Mongoid 中使用 or 条件进行查询 这是 OR 在 mongoid 中查询 如果你想要像下面这样的查询 select from user where id 10 or name hitesh 在带有 mongoid 的 Ra
  • 如何在不初始化Rails的情况下从schema.rb创建数据库?

    我正在尝试从 schema rb 创建所有表 我使用命令 rake db schema load 但是 这失败了 因为在我的一个初始化程序中 它引用了一个显然不存在的模型 表 因为数据库为空 我可以注释掉这些行 然后再次运行 schema
  • Ruby:如何在不创建新实例的情况下检查实例方法的参数?

    在 Ruby 1 9 2 中 您可以使用 method symbol 检查任何方法的参数 如何在不创建新车的情况下检查 Car initialize 方法 class Car def initialize fuel type passeng
  • ruby 中 Array#uniq 方法的时间复杂度是多少?

    谁能告诉我 ruby 内部使用哪种算法来使用 ruby 数组删除重复项Array uniq method 来自docs http www ruby doc org core 1 9 3 Array html static VALUE rb
  • Rails 6:每个用户只能创建一个配置文件

    我目前正在开发 Rails 6 应用程序 我有以下关联 用户有一个配置文件 并且配置文件属于用户 当编辑用户的配置文件时 我最终为该用户提供了两个配置文件 我希望每个用户只有一份个人资料 编辑表单 profile edit html erb
  • 自动将 JSON 对象映射到 Ruby 中的实例变量

    我希望能够自动将 JSON 对象解析为实例变量 例如 使用此 JSON require httparty json HTTParty get http api dribbble com players simplebits gt shots
  • 比较 ruby​​ 中的两个字符串[关闭]

    很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 我刚刚开始学习 ruby 这可能很容
  • 如何将枚举作为字符串存储到rails中的数据库中

    如何在 ruby 中创建迁移 其中默认值是字符串而不是整数 我想将枚举存储到数据库中 但我不想将其存储为整数 因为这样对于另一个应用程序来说没有意义想要使用同一张桌子 我该怎么做default female 代替default 0 clas
  • Ruby:创建日期范围

    我正在寻找一种优雅的方式来制作一系列日期时间 例如 def DateRange start time end time period end gt gt results DateRange DateTime new 2013 10 10 1
  • 不理解 Ruby ljust/rjust/center 方法

    我正在学习嵌套 我的任务是使每条新行都以缩进开头 这是我的代码 但它不起作用 nestingDepth 0 def logger description block puts Beginning description rjust nest
  • 如何从 Rails 项目中删除 gem?

    我正在尝试从我的项目中删除一个 gem 因此我进入了 gem 文件并将其注释掉 gem some gem gem gem I dont want gem another gem 然后我跑 bundle 为了检查宝石是否消失 我输入 bund
  • 如何让 DateTime.parse 返回您所在时区的时间?

    我需要这个 require date DateTime parse Mon Dec 27 6 30pm 返回 EDT 时区下午 6 30 的日期时间 但返回 UTC 时间 如何获取 EST 日期时间或将 UTC 日期时间转换为下午 6 30
  • 如何验证单选按钮?

    我的 Rails 应用程序中有一个单选按钮 我想编写一个 java 脚本代码 在未选择任何选项时验证这一点 在你的 votes 类中做类似的事情 class Myvotes lt ActiveRecord Base validates vo
  • 在 (Mac)Vim 中查看 ri 时摆脱 ANSI 转义字符

    我在 gvim 和 MacVim 中查看 ri 文档时遇到问题 在两者上都尝试过 一些 ri 文档包含在终端窗口中查看时看起来不错的文本装饰 但在 gvim MacVim 中查看时包含 ANSI 转义字符 例如 以下 ri 片段来自 ri
  • Ruby openssl 文档 [关闭]

    Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 有没有 Ruby 的在线文档openssl图书馆 我能找到的只是博客文章和第三方文章 而 rdoc 本
  • 获取特定时区一天开始时的时间对象

    如何获取代表给定时区特定日期的一天开始时间的 ruby Time 对象 date Date today date to time in time zone America New York beginning of day 目前输出 gt
  • 如何从另一个 .rb 文件访问模块内和类内的 Ruby 方法

    我想知道如何从另一个 rb 文件访问此模块中的方法 module Decisioning module Decision class OfferProxy lt FinanceApplication Offer def my method

随机推荐

  • Materialize.css 从输入元素中删除样式

    我想让 Materialize css 卡在双击时可编辑 为此 我将输入放在卡片 div 中 而不是 p 中 div row each cards div col m4 s12 div card teal div card content
  • 用于打印 1-99 奇数的最有效代码 [关闭]

    Closed 这个问题是无法重现或由拼写错误引起 help closed questions 目前不接受答案 任务是将 1 到 99 的奇数打印在不同的行上 Codeeval 认为此代码部分正确 100 中的 98 已编辑 liszt i
  • 修改Http状态代码文本

    Question 如何修改状态代码文本 描述 标题 Example 例如 我想改变200 Ok to 200 My Custom Text 描述 我想创建一个带有自定义状态代码 未保留 431 的 HTTP 响应 我想修改它的文本 200
  • 从输入标签获取名称和值

    在你说 哦不 不再这样 之前 我先陈述一下我的情况 我正在解析 HTML 输出的一部分 我唯一感兴趣的是name and value每个的属性
  • 删除 androidx 首选项上的空白图标空间

    我刚刚将我的项目迁移到使用androidx图书馆 新的首选项 设置屏幕现在显示空的图标空间 如图所示here https developer android com guide topics ui settings organize you
  • 根据用户输入动态创建表

    我目前正在尝试使用 JS 和 HTML 动态创建一个表 但目前它似乎无法从用户输入中检索值 我做错了什么 提前致谢
  • 如何根据 XSD 文件验证 XML 文件?

    我正在生成一些 xml 文件 这些文件需要符合给我的 xsd 文件 我应该如何验证它们是否符合要求 Java 运行时库支持验证 上次我检查的是 Apache Xerces 解析器 你可能应该使用javax xml validation Va
  • Swift 将数组作为参数传递错误

    我刚刚开始使用 Swift 有人可以向我解释一下为什么我可以将数组作为参数传递 byRoundingCorners UIBezierPath roundedRect self bounds byRoundingCorners topLeft
  • Delphi在全局异常中的屏幕截图

    我正在开发一个组件 使用德尔福2006 该组件检索系统信息并写入文件 要求是我必须在组件中合并一个全局异常处理程序 因此当异常发生时它将被捕获并向用户显示我的自定义消息 procedure Tmy GlobalExceptionHandle
  • 在 C# 中通过节点名称和属性名称比较 XML

    我想通过标签名称和属性名称来比较两个 或更多 XML 文件 我对属性或节点的值不感兴趣 在 google 上搜索我发现 XMLDiff Patch http msdn microsoft com en us library aa302294
  • 如何在斯坦福 CoreNLP 服务器上使用自定义 TokensRegex 规则注释器?

    TokensRegex 规则颜色注释器 stanford corenlp full 2016 10 31 tokensregex color rules txt 通过命令行使用 CoreNLP 时加载成功 但对于 Web 服务器则失败jav
  • 如何将文件扩展名与 C# 中的当前可执行文件关联

    我想将文件扩展名与 C 中的当前可执行文件关联起来 这样 当用户随后在资源管理器中单击该文件时 它将使用给定文件作为第一个参数来运行我的可执行文件 理想情况下 它还会将给定文件扩展名的图标设置为我的可执行文件的图标 谢谢大家 似乎没有用于直
  • iOS 7 上的返回箭头

    我需要在我的应用程序中添加一个左栏按钮项目 它看起来像系统后退按钮 但不是系统后退按钮 因为它将出现在视图控制器上 这是我的 navController 堆栈的唯一 vc 并执行我自己的代码 简单地写 后退 对我来说并不是很好 因为我还需要
  • 如何消除除本地 Pod 之外的所有 Pod 的警告?

    我假设类似的事情 post install do installer Debug symbols installer pod project targets each do target target build configuration
  • 使用鼠标和 Swing 绘制(单色)数组的最简单方法是什么?

    我一直在寻找一种在屏幕上绘制黑白数组的方法 这是一个简单的数组 只有 20x20 我计划做的是用鼠标在数组上绘制 以便每个像素在单击时从黑色 切换 到白色并返回 然后将数组作为一组布尔值 或整数 传递给另一个函数 目前我正在使用 Swing
  • 使用 jQuery 发送 JSON 数据

    为什么下面的代码将数据发送为City Moscow Age 25而不是 JSON 格式 var arr City Moscow Age 25 ajax url Ajax ashx type POST data arr dataType js
  • 无子项但不为空的 CSS 选择器

    我想在下面的 HTML 片段中选择 BONKERS 它的区别在于它单独存在于一个 code 块 而它的所有兄弟都包含 a s empty是显而易见的选择 但由于文本节点而不起作用 我以为我知道这些东西 但这让我发疯 ul class Ref
  • Compute Engine SSH:您没有足够的权限通过 SSH 连接到此实例

    我无法通过浏览器或 gcloud 使用 ssh 访问我的 google 云计算引擎实例 我的用户帐户有所需的compute instances osLogin许可 事实上它有Owner角色 并且我已经设置了enable oslogin to
  • 导入错误:没有名为connector.conversion的模块

    我对 mySQL 非常陌生 刚刚将其安装在我的 Mac 操作系统 10 6 8 上 当我尝试通过终端连接数据库时 我收到以下消息 上次登录 6 月 17 日星期二 10 42 23 在控制台 mysqluc e help utility 上
  • 如何降级 jekyll 以使用 github 页面?

    我认为我的主要问题是 github 页面不支持 jekyll 4 这对我来说没问题 但是无论如何我如何降级 jekyll 才能工作呢 我尝试按照此处的说明进行操作 https github com github pages gem issu