【问题标题】:Cannot find bundler gem for a Jekyll blog找不到 Jekyll 博客的 bundler gem
【发布时间】:2017-01-24 02:37:29
【问题描述】:

我正在尝试设置一个新的 Jekyll 站点,但在使用 jekyll new testSite 创建一个新站点后遇到了问题。

我收到一条错误消息:

New jekyll site installed in /Users/myPath.
  Dependency Error: Yikes! It looks like you don't have bundler or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- bundler' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!
jekyll 3.3.1 | Error:  bundler

我已经使用 gem install bundler 安装了 bundler,但似乎找不到它。

bundler -vBundler version 1.14.2

jekyll -vjekyll 3.3.1

提前致谢!

【问题讨论】:

    标签: ruby jekyll bundler


    【解决方案1】:

    假设您正确安装了 ruby​​、jekyll 和 blunder。在testSite 文件夹内运行:

    bundle
    

    bundle(或bundle install,参见bundler doc)将安装您的 Gemfile 中指定的依赖项。

    然后运行您的新网站:

    bundle exec jekyll s
    

    【讨论】:

    • 感谢您的回复!所以我运行bundle install,它说它安装了依赖项和gem,但是当我运行bundle exec jekyll s 时,它说Could not find jekyll-feed-0.8.0 in any of the sources Run bundle install` 来安装丢失的gems。` 仍然很奇怪。
    • 是的。看起来很奇怪 :) 尝试 bundle update 显式更新 gem 的版本。还要检查您是否处于与this类似的情况
    【解决方案2】:

    以下命令在 ubuntu 中对我有用。

    sudo apt install ruby-bundler
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-29
      • 2018-04-12
      • 2023-03-04
      • 1970-01-01
      相关资源
      最近更新 更多