【发布时间】:2023-02-04 09:17:21
【问题描述】:
我正在尝试按照官方website 上的说明使用 github 和 jekyll 制作我的个人网站
当我到达部分时:
jekyll new --skip-bundle
我收到了:
can't find gem jekyll (>= 0.a) with executable jekyll (Gem::GemNotFoundException)
我尝试了几种方法,例如提到的here,我用sudo运行命令。再次运行 jekyll new --skip-bundle 后。
这是安装后的终端响应 here
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)
如果您能帮助我解决问题,我将不胜感激。 我使用 macOS。
更新:
我运行 bundle add jekyll 并收到:
Your RubyGems version (3.0.3) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3
找不到 Gemfile`
然后我跑gem update --system 3.2.3
Updating rubygems-update
Fetching rubygems-update-3.2.3.gem
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
下一步我运行sudo gem update --system 3.2.3,我收到了:
Updating rubygems-update
Fetching rubygems-update-3.2.3.gem
Successfully installed rubygems-update-3.2.3
Parsing documentation for rubygems-update-3.2.3
Installing ri documentation for rubygems-update-3.2.3
Installing darkfish documentation for rubygems-update-3.2.3
Done installing documentation for rubygems-update after 78 seconds
Parsing documentation for rubygems-update-3.2.3
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.2.3
ERROR: While executing gem ... (Errno::EROFS)
Read-only file system @ rb_sysopen - /usr/share/man/man1/bundle-platform.1
所以我仍然没有添加 jekyll ....
【问题讨论】:
标签: ruby-on-rails ruby rubygems jekyll github-pages