Jekyll Setup
Device : Ubuntu25.04
Always use RVM(Ruby version manager) or package manager rbenv to avoid permission issues.
- Install ruby
sudo apt update sudo apt install ruby-full build-essential zlib1g-devcheck version (Ruby3.0+ onwards removed webrick which was needed by jekyll so maually need to be installed)
ruby -v - setup Gem installation directory :
Ruby will install libraries in your user folder, not the system folder.echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc source ~/.bashrc - Write Gemfile inside the Project root folder
source "https://rubygems.org" gem "github-pages", group: :jekyll_plugins gem "webrick" - Install Dependencies
bundle install - Create
.gitignoreand add the folders just created after previous step_site/ vendor/ .bundle/ .sass-cache/ .jekyll-cache/ #ignore Gemfile & Gemfile.lock - Start the Server
bundle exec jekyll serve
Q&A
- Differnce between Gem, Ruby, Bundle ?
- Why package manager are needed to avoid permission issue ?
- Why echo commands are used here for Gem installation directory ?
- Why webrick removed from ruby3.0+ but not from jekyll ?