Logo da F&MD

Contribuindo

Instalando o Jekyll

sudo apt-get install ruby-full build-essential zlib1g-dev

Para zsh, adicione ao .zshrc:

mkdir ~/gems
echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.zshrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Para bash (terminal normal), adicione ao .bashrc:

mkdir ~/gems
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Instale o bundler:

gem install jekyll bundler

Agora vamos até o diretório do projeto e subimos o servidor:

cd /caminho/do/projeto
bundle install
bundle exec jekyll serve --livereload

Erros comuns

Como corrigir “Your Ruby version is x.x.x, but your Gemfile specified x.x.x” enquanto o servidor inicia?

  1. Exclua a pasta .jekyll-cache
  2. Rode o comando gem install jekyll bundler novamente
  3. Rode o comando bundle exec jekyll serve --livereload novamente