症状:
Bundler could not find compatible versions for gem "jekyll"
解決方法:
# クリーンセットアップスクリプトを実行
chmod +x clean_setup.sh
./clean_setup.sh
症状:
github-pages gem が古いJekyllバージョンを要求する
解決方法:
# gemをアップデート
gem update github-pages
bundle update
症状:
Your Ruby version is X.X.X, but your Gemfile specified Y.Y.Y
解決方法:
macOS (Homebrew):
brew update
brew upgrade ruby
# または rbenv を使用
rbenv install 3.0.0
rbenv local 3.0.0
症状:
cannot load such file -- webrick (LoadError)
解決方法: Gemfileに既に含まれていますが、もし問題がある場合:
bundle add webrick
症状:
Permission denied
解決方法:
# スクリプトに実行権限を付与
chmod +x setup.sh
chmod +x clean_setup.sh
# gemのインストール場所を変更
bundle config set --local path 'vendor/bundle'
bundle install
症状:
Address already in use
解決方法:
# 別のポートを使用
bundle exec jekyll serve --port 4001
# または既存のプロセスを終了
lsof -ti:4000 | xargs kill -9
A: _config.yml
の baseurl
を確認してください:
# リポジトリ名が "eventle-lp" の場合
baseurl: "/eventle-lp"
A:
bundle exec jekyll clean
を実行_config.yml
の baseurl を確認A: 画像パスで relative_url
フィルターを使用していることを確認:
<img src="/images/image.png" alt="">
A: _data/content.yml
を編集してください。Jekyllサーバーが起動中の場合は自動的に再読み込みされます。
bundle exec jekyll build --verbose --trace
echo "Ruby: $(ruby -v)"
echo "Bundler: $(bundle -v)"
echo "Jekyll: $(bundle exec jekyll -v)"
# 新しいディレクトリでテスト
mkdir test-jekyll
cd test-jekyll
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'github-pages', group: :jekyll_plugins" >> Gemfile
bundle install
bundle exec jekyll new . --force
bundle exec jekyll serve