jekyll-TeXt-theme icon indicating copy to clipboard operation
jekyll-TeXt-theme copied to clipboard

bundle exec jekyll serve failed

Open wanghc0 opened this issue 4 years ago • 2 comments

  • trace: ➜ xxx ✗ bundle exec jekyll serve --trace Dependency Error: Yikes! It looks like you don't have jemoji or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. If you've run Jekyll with bundle exec, ensure that you have included the jemoji gem in your Gemfile as well. The full error message from Ruby is: 'cannot load such file -- nokogiri/nokogiri' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/! bundler: failed to load command: jekyll (/Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/bin/jekyll) Traceback (most recent call last): 42: from /usr/bin/bundle:23:in <main>' 41: from /usr/bin/bundle:23:in load' 40: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/exe/bundle:37:in <top (required)>' 39: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/friendly_errors.rb:130:in with_friendly_errors' 38: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/exe/bundle:49:in block in <top (required)>' 37: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:24:in start' 36: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 35: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:30:in dispatch' 34: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 33: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' 32: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 31: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:494:in exec' 30: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:28:in run' 29: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in kernel_load' 28: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in load' 27: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/bin/jekyll:23:in <top (required)>' 26: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/bin/jekyll:23:in load' 25: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/exe/jekyll:15:in <top (required)>' 24: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in program' 23: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go' 22: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in execute' 21: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each' 20: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in block in execute' 19: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in block (2 levels) in init_with_program' 18: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in process_with_graceful_fail' 17: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in each' 16: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in block in process_with_graceful_fail' 15: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in process' 14: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in new' 13: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:36:in initialize' 12: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:131:in setup' 11: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:22:in conscientious_require' 10: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:30:in require_gems' 9: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in require_with_graceful_fail' 8: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in each' 7: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in block in require_with_graceful_fail' 6: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in require' 5: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jemoji-0.12.0/lib/jemoji.rb:4:in <top (required)>' 4: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jemoji-0.12.0/lib/jemoji.rb:4:in require' 3: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/html-pipeline-2.14.0/lib/html/pipeline.rb:3:in <top (required)>' 2: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/html-pipeline-2.14.0/lib/html/pipeline.rb:3:in require' 1: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.0-arm64-darwin/lib/nokogiri.rb:13:in <top (required)>' /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.0-arm64-darwin/lib/nokogiri.rb:13:in require': dlopen(/Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.0-arm64-darwin/lib/nokogiri/2.6/nokogiri.bundle, 0x0009): could not use '/Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.0-arm64-darwin/lib/nokogiri/2.6/nokogiri.bundle' because it is not a compatible arch - /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.0-arm64-darwin/lib/nokogiri/2.6/nokogiri.bundle (LoadError) 43: from /usr/bin/bundle:23:in

    ' 42: from /usr/bin/bundle:23:in load' 41: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/exe/bundle:37:in <top (required)>' 40: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/friendly_errors.rb:130:in with_friendly_errors' 39: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/exe/bundle:49:in block in <top (required)>' 38: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:24:in start' 37: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 36: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:30:in dispatch' 35: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 34: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' 33: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 32: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:494:in exec' 31: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:28:in run' 30: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in kernel_load' 29: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in load' 28: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/bin/jekyll:23:in <top (required)>' 27: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/bin/jekyll:23:in load' 26: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/exe/jekyll:15:in <top (required)>' 25: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in program' 24: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go' 23: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in execute' 22: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each' 21: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in block in execute' 20: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in block (2 levels) in init_with_program' 19: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in process_with_graceful_fail' 18: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in each' 17: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in block in process_with_graceful_fail' 16: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in process' 15: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in new' 14: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:36:in initialize' 13: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:131:in setup' 12: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:22:in conscientious_require' 11: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:30:in require_gems' 10: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in require_with_graceful_fail' 9: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in each' 8: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in block in require_with_graceful_fail' 7: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in require' 6: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jemoji-0.12.0/lib/jemoji.rb:4:in <top (required)>' 5: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jemoji-0.12.0/lib/jemoji.rb:4:in require' 4: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/html-pipeline-2.14.0/lib/html/pipeline.rb:3:in <top (required)>' 3: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/html-pipeline-2.14.0/lib/html/pipeline.rb:3:in require' 2: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.0-arm64-darwin/lib/nokogiri.rb:11:in <top (required)>' 1: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.0-arm64-darwin/lib/nokogiri.rb:32:in rescue in <top (required)>' /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.11.0-arm64-darwin/lib/nokogiri.rb:32:in require': cannot load such file -- nokogiri/nokogiri (LoadError) 36: from /usr/bin/bundle:23:in
    ' 35: from /usr/bin/bundle:23:in load' 34: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/exe/bundle:37:in <top (required)>' 33: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/friendly_errors.rb:130:in with_friendly_errors' 32: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/exe/bundle:49:in block in <top (required)>' 31: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:24:in start' 30: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 29: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:30:in dispatch' 28: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 27: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' 26: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 25: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli.rb:494:in exec' 24: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:28:in run' 23: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in kernel_load' 22: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in load' 21: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/bin/jekyll:23:in <top (required)>' 20: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/bin/jekyll:23:in load' 19: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/exe/jekyll:15:in <top (required)>' 18: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in program' 17: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go' 16: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in execute' 15: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each' 14: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in block in execute' 13: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in block (2 levels) in init_with_program' 12: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in process_with_graceful_fail' 11: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in each' 10: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in block in process_with_graceful_fail' 9: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in process' 8: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in new' 7: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:36:in initialize' 6: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:131:in setup' 5: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:22:in conscientious_require' 4: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:30:in require_gems' 3: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in require_with_graceful_fail' 2: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in each' 1: from /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:58:in block in require_with_graceful_fail' /Users/xxx/blog.xxx.io/tech_articles/blog/vendor/bundle/ruby/2.6.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:73:in rescue in block in require_with_graceful_fail': jemoji (Jekyll::Errors::MissingDependencyException)

  • OS: macOS 11.2.1

wanghc0 avatar Mar 24 '21 23:03 wanghc0

hello, have you tried with docker-compose instead?

mohzulfikar avatar May 05 '21 12:05 mohzulfikar

Hi, I have the same issue, and the reason might be that my environment was set up by sudo gem install jekyll bundler. Using sudo to install ruby gem is discouraged.

I fix the problem by install ruby with brew and follow the documentation to install bundle jekyll. Everything works perfectly now.

ginaz5 avatar Nov 19 '21 11:11 ginaz5