簡體   English   中英

找不到帶有可執行 jekyll (Gem::GemNotFoundException) 的 gem jekyll (>= 0.a)

[英]can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)

我正在嘗試按照官方網站上的說明使用 github 和 jekyll 制作我的個人網站

當我到達部分時:

jekyll new --skip-bundle

我收到了:

can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)

我嘗試了幾種方法,例如此處提到的方法,然后使用sudo運行命令。 再次運行jekyll new --skip-bundle后。

這是按照此處的說明安裝后的終端響應

Fetching bundler-2.4.5.gem
Successfully installed bundler-2.4.5
Parsing documentation for bundler-2.4.5
Installing ri documentation for bundler-2.4.5
Done installing documentation for bundler after 0 seconds
1 gem installed

這是我再次運行jekyll new --skip-bundle時的終端響應:

Traceback (most recent call last):
    2: from /usr/local/bin/jekyll:22:in `<main>'
    1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:262:in `bin_path'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)

如果您能幫助我解決問題,我將不勝感激。

注意:將更新我的答案,因為我還不能評論要求澄清

這是按照此處的說明安裝后的終端響應

您正在運行它來安裝 Bundler(您可以將其視為 gem 存儲)。 在這里你知道對於 jekyll 錯誤代碼,它有同樣的問題(它沒有找到運行 jekyll 的源代碼)。 要解決此問題,請安裝 jekyll

如果你想從 bundler 運行 jekyll,試試這個(推薦)參考

bundle add jekyll #This will add jekyll to Gemfile (gem dependencies manager)
bundle install #This will check/install the gem from Gemfile
bundle exec jekyll #This will run jekyll from the bundle

如果不想使用bundle,可以直接安裝gem

gem install jekyll
jekyll #this should work and have message related to jekyll

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2025 STACKOOM.COM