-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Bundler Installation Instructions #6828
Conversation
This commit addresses issue jekyll#6800. Specifically, this commit adds a section for installing Jekyll using Bundler (as an alternative to the gem command or RVM). In addition, clean up the surrounding instructions a bit, and add some helpful hints. One hint for Ubuntu users to get started quickly, and one hint for people who run into permissions problems with `gem install jekyll`.
docs/_docs/installation.md
Outdated
bundle install --path vendor/bundle # Set install path to ./vendor/bundle | ||
bundle add jekyll # Add & install Jekyll gem | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of this method though..
A new user would get confused by having to run bundle exec jekyll new .
and be greeted by an error message.,. while elsewhere in the docs, we simply instruct users to initialize a jekyll project with
jekyll new [jekyll-project-path]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could distinct new with defaults from blank (working on a PR to have a working default directory structure. with blank)
docs/_docs/installation.md
Outdated
Then, add Jekyll to your project's dependencies: | ||
|
||
```sh | ||
cd my-jekyll-project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can't cd
into a path that doesn't exist before-hand..
docs/_docs/installation.md
Outdated
|
||
First, install Bundler (as a system-wide gem): | ||
```sh | ||
sudo gem install bundler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the goal is to avoid permissions issues, using sudo
is a non-starter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the recommended method then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gem install --user-install bundler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I've always installed Bundler along with Ruby via apt on Ubuntu, but if you're on LTS it's a really old version of Bundler... But you're right, we shouldn't recommend that.
docs/_docs/installation.md
Outdated
@@ -37,11 +46,34 @@ Before you start, make sure your system has the following: | |||
</p> | |||
</div> | |||
|
|||
## Install & Use Jekyll with Bundler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t know if we want this ./vendor/bundle
method to be presented first, as if it is the default/recommended method :/
docs/_docs/installation.md
Outdated
<p> | ||
The above command performs a system-wide install of jekyll (on most | ||
systems). If you get a permissions error, you can either run the command as root | ||
(<code>sudo gem install jekyll</code>) or use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This always leads to conflicts with multiple versions of Jekyll being installed. There have been countless bug reports from users who installed Jekyll using sudo
without understanding what that meant. Let’s recommend installing to ~/
instead of using sudo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. No sudo.
docs/_docs/installation.md
Outdated
The above command performs a system-wide install of jekyll (on most | ||
systems). If you get a permissions error, you can either run the command as root | ||
(<code>sudo gem install jekyll</code>) or use | ||
<a href="https://rvm.io/gemsets/basics">RVM</a> to manage your Gems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn’t RVM for managing Ruby versions? I have always used RVM in addition to Bundler. Can we provide any more detail here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a simpler method than the one listed here?
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.5.0
rvm use 2.5.0 --default
ruby -v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only simpler method I can think of is if RVM is in your system's package manager repositories, I'm afraid.
docs/_docs/installation.md
Outdated
@@ -28,6 +29,14 @@ Before you start, make sure your system has the following: | |||
</p> | |||
</div> | |||
|
|||
<div class="note info"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need three notes in a row?
Is there a better way to present this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Let's do a section per system.
Thanks @mkasberg, we need to do better on install instructions for different systems. This feels too custom/advanced for a default install compared to the instructions for installing jekyll on Linux on CloudCannon. I don't mind adding a dedicated This does not prevent to also add advanced methods and custom options like the Resources: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our installation section is now so big, we definitely need a table of contents or something of the like. Also I'm not sure whether putting the bundler method first is the right choice here, while it is probably the right-est method, it's not the easiest one and not the one we should recommend.
docs/_docs/installation.md
Outdated
|
||
To use Jekyll with [Bundler](https://bundler.io/), add it as a | ||
dependency of your project. It can be installed in a sub-directory of the | ||
project. This avoids permissions issues, and also allows you to use different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
permissions
-> permission
docs/_docs/installation.md
Outdated
The above command performs a system-wide install of jekyll (on most | ||
systems). If you get a permissions error, you can either run the command as root | ||
(<code>sudo gem install jekyll</code>) or use | ||
<a href="https://rvm.io/gemsets/basics">RVM</a> to manage your Gems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only simpler method I can think of is if RVM is in your system's package manager repositories, I'm afraid.
Thanks for all the comments everyone, it's all good feedback. I think perhaps this pull request is changing too much too quickly. @oe brings up a good point that while Bundler may be preferable for some users, perhaps it's not a good default if you're going for the simplest method. Also, I don't do I guess the original thing that I wanted to fix is to make sure a new user knows what to do if they run into permissions problems at the |
Yes. 💯 This has been a very difficult problem for us to solve. On the one hand, we do not distribute or support Ruby or Bundler and aren't really setup to support users that are still trying to get those things installed. On the other hand, this is the biggest hurdle for new users getting started with Jekyll, and I am sure we would have happier users (and quite possibly more developers) if installing Jekyll were not by far the most difficult step toward using (or contributing to) Jekyll. What makes it especially tricky is that, as on display in this thread, it seems there are as many different ways to install Jekyll as there are users using Jekyll. This means there isn't necessarily anything as simple as "Copy these three lines and paste them into a shell." You have done a lot of good work here and it would be a shame to just close the PR. I wonder if this could be spun into a tutorial for installing Jekyll on Ubuntu or something similar? Maybe for users that want to use a Docker container or install Jekyll system wide, make sure you have these dependencies and Thoughts @DirtyF? |
AFAIK, it's over lengthy for most users. Shall we make a tl;dr as recommended installation method for OS with much population at the top? |
I could spin this PR off into a tutorial, "Using Jekyll as a Bundler Dependency," that's probably a better place for it. It can be done without the I'm also willing to help with writing installation instructions for GNU/Linux, I think the idea of separate sections probably makes sense. |
Based on discussion in PR jekyll#6828, move the instructions for setting up a project with Bundler to a tutorial. This is a better place for it since the installation instructions are targeted primarily at new users, and it can be confusing to list several different installation methods - particularly more complex ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic! I really like having this in the Tutorials section!
I really like this document conceptually, but I'm a bit tired at the moment so somebody from @jekyll/documentation should also review 😴:+1: |
because Jekyll gets confused if the Gemfile already exists. | ||
|
||
```sh | ||
bundle exec jekyll new --force --skip-bundle . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you missed the 'dot' .
here.. bundle exec jekyll new .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashmaroli the dot is included here, at the end of the line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gosh.. I did not see that..
guess my brain registered it as a 'full-stop'.. 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really good!
@jekyllbot: merge +docs |
This commit addresses issue #6800. Specifically, this commit adds a
section for installing Jekyll using Bundler (as an alternative to the
gem command or RVM).
In addition, clean up the surrounding instructions a bit, and add some
helpful hints. One hint for Ubuntu users to get started quickly, and one
hint for people who run into permissions problems with
gem install jekyll
.