Last active
December 31, 2022 10:53
-
-
Save dfsp-spirit/dfc533b249596a48ccc48e084b213c94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing jekyll under Ubuntu 22.04 | |
This was quite a pain, and I tried several things. This is a method that worked, but I do not | |
have much Ruby experience and cannot tell you whether its the best method. This method uses a local ruby installation in your user directory, so it is very low-risk. | |
1. Install reub-install from https://github.com/postmodern/ruby-install: | |
```shell | |
wget -O ruby-install-0.8.5.tar.gz https://github.com/postmodern/ruby-install/archive/v0.8.5.tar.gz | |
tar -xzvf ruby-install-0.8.5.tar.gz | |
cd ruby-install-0.8.5/ | |
sudo make install | |
``` | |
2. Use ruby-install to install ruby as normal user: | |
```shell | |
ruby-install ruby | |
``` | |
This will install into your home, into `~/.rubies/ruby-<version>`. | |
For me, the latest stable ruby version was `ruby-3.2.0`, so my gem executable is at `~/.rubies/ruby-3.2.0/bin/gem`. | |
3. Using the gem command from your local ruby installation, install jekyll into your user dir: | |
```shell | |
~/.rubies/ruby-3.2.0/bin/gem install --user-install jekyll | |
``` | |
4. Add gem dir to path, so gem executables can run: | |
```shell | |
export PATH=$PATH:/home/spirit/.gem/ruby/3.2.0/bin | |
``` | |
5. Now, you can run jekyll: | |
```shell | |
jekyll | |
``` | |
It should show the help. Have fun generating your website. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment