Running the Website Locally
Running the Website Locally
Quick Start
- Navigate to the website directory:
cd /Users/rp/rp-repo/Website - Install dependencies (if not already installed):
bundle install --path vendor/bundleIf you get permission errors, you can also try:
bundle config set --local path 'vendor/bundle' bundle install - Start the Jekyll server:
bundle exec jekyll serveOr if you want live reload (auto-refresh on file changes):
bundle exec jekyll serve --livereload View your website: Open your browser and go to: http://localhost:4000
- Stop the server: Press
Ctrl+Cin the terminal
Alternative: Using Jekyll Directly
If bundle install doesn’t work, you can try installing Jekyll globally (though this is not recommended):
gem install jekyll bundler
bundle install
bundle exec jekyll serve
Troubleshooting
Permission Errors
If you get permission errors with the system Ruby, consider using a Ruby version manager:
- rbenv:
brew install rbenv ruby-build - rvm:
curl -sSL https://get.rvm.io | bash
Port Already in Use
If port 4000 is already in use, specify a different port:
bundle exec jekyll serve --port 4001
Dependencies Not Found
If you see dependency errors, try:
bundle clean
bundle install
Notes
- The site will automatically rebuild when you make changes to files
- The
--livereloadflag will automatically refresh your browser when files change - Jekyll serves the site in development mode by default (shows drafts, etc.)
