Server running Debian/Ubuntu Server with Nginx webserver set up.
Update System
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install git
Install Ruby using Ruby Version Manager
Ubuntu Server comes with Curl, so you won't need this (just know that Curl is needed):
sudo apt-get install curl
Ruby & Ruby Gems without RVM:
apt-get install ruby ruby-dev rubygems build-essential
Install RVM:
The carriage returns in the cURL request examples that are part of the cURL syntax are escaped with a backslash ('') in order to avoid prematurely terminating the command. (via)
\curl -L https://get.rvm.io | bash -s stable
And be sure to follow any subsequent instructions as guided by the installation process. For example, in my case, it was like this:
So, what does it say?
-
Add the following line to
~/.bash_profile
or~/.bash_login
, whichever exists.source ~/.profile
.bash_profile
exists in my case, so I edited it as suggested. -
Before you start using RVM, run the following command in all your open shell windows, then (it's best to) exit out of your shell session(s) and start up new one(s).
source ~/.rvm/scripts/rvm
-
Read output of
rvm requirements
andrvm notes
commands. So, I did (it's very very important, IMO).As you can see
rvm requirements
command told me to do this:sudo apt-get update sudo apt-get --no-install-recommends install bash curl git patch bzip2 sudo apt-get --no-install-recommends install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev
Install Ruby 1.9.3 and the latest version of RubyGems:
rvm install 1.9.3
rvm use 1.9.3
rvm rubygems current
Run ruby --version
to be sure you're using Ruby 1.9.3.
- http://octopress.org/docs/setup/
- https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm
Install Jekyll
gem install jekyll
Now's the real deal. Create the directory where you'll be storing all the source/files related to your Jekyll site, and cd
to it.
mkdir ~/jekyll
cd jekyll
Configuration
Drop your Jekyll site source (templates, plugins, etc) under ~/jekyll
. One way to check if you are doing it right is to check if this file exists ~/jekyll/_config.yml
.
(If you are a newbie and in need of a starter template to understand site structure and stuff, jekyll/site directory from the official repository should be a good starting point.)
Markdown Interpreter: Redcarpet
I prefer to use Redcarpet instead of Maruku or RDiscount for markdown, as I like GitHub Flavored Markdown, and especially because GitHub uses it.
Install Redcarpet gem:
gem install redcarpet
Then add this line in your _config.yml
file:
markdown: redcarpet
(or simply issue the command jekyll --redcarpet
-- THIS IS WHERE I GET THE ERROR)
Pygments
Install:
sudo apt-get install python-pygments
Pick one of the supported theme styles for Pygments, and generate the CSS file by running the command:
pygmentize -f html -S default -a .highlight > pygments.css
Don't forget to replace default
in the command with the identifier for the theme style of your choice. To get a list of all available styles, run theese 4 commands in succession:
python
>>> from pygments.styles import get_all_styles
>>> styles = list(get_all_styles())
>>> styles
And reference the css style in your HTML template (see links below). I am using the GitHub Style theme for Pygments.
Jekyll's supported Markdown parsers: https://github.com/jekyll/jekyll/tree/master/lib/jekyll/converters/markdown
JavaScript Runtime
- https://github.com/joyent/node/wiki/backports.debian.org
- https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
- http://antler.co.za/2014/04/install-node-js-npm-on-debian-stable-wheezy-7/
If using Pygments, you need to install Python:
apt-get -y install python