Change - Jekyll 4.2.2 ---> Jekyll 3.9.0

Hello, how can i change from Jekyll 4.2.2 —> Jekyll 3.9.0 ?

Can i use Jekyll 4.2.2 and Jekyll 3.9.0 in one system?

Greets
steveng

Jekyll 3.9.0 Released 05 Aug 2020

jekyll -v
/var/lib/gems/2.7.0/gems/jekyll-3.9.1/lib/jekyll/drops/document_drop.rb:8: warning: already initialized constant Jekyll::Drops::DocumentDrop::NESTED_OBJECT_FIELD_BLACKLIST
/usr/lib/ruby/vendor_ruby/jekyll/drops/document_drop.rb:8: warning: previous definition of NESTED_OBJECT_FIELD_BLACKLIST was here
/var/lib/gems/2.7.0/gems/jekyll-3.9.1/lib/jekyll/drops/drop.rb:8: warning: already initialized constant Jekyll::Drops::Drop::NON_CONTENT_METHODS
/usr/lib/ruby/vendor_ruby/jekyll/drops/drop.rb:8: warning: previous definition of NON_CONTENT_METHODS was here                                                                
jekyll 3.9.0                                  

Debian 11 - Paket: jekyll (3.9.0+dfsg-3)

Yes, it should work if you are using Bundler with Gemfiles that specify the desired Jekyll version for each project.

Hello @chuckhoupt , did you have two CLI input for me?

Bundler could not find compatible versions for gem "jekyll"

Or a solution for this problem?

Thank’s

steveng

In your other post, the problem is that your Gemfile doesn’t specify which Jekyll to use (the line is commented out). For Jekyll, every Gemfile should have a line for Jekyll. For example, for the latest v3 use:

gem "jekyll", "~> 3"

1 Like

@chuckhoupt

Hello, i use

jekyll new myblog

I get a local website build with Jekyll 4.2.2.

How can i get a new local Website build with Jekyll 3.9.0?

Thank you

steveng

If you have Jekyll 3.9.0 installed (i.e. it appears in gem list), then you can select the version like this:

jekyll _3.9.0_ new myblog

Note that if your goal is to create a Jekyll site that is compatible with Github-Pages, it might be easier to start with Bundler, so that all the correct dependencies are setup int eh Gemfile. Roughly:

mkdir ghblog && cd ghblog
bundle init
bundle add github-pages
# Add some content, like index.html and _config.yml and run:
bundle exec jekyll serve --open-url --livereload

Of course, even easier is to first create the blog on Github and then clone it.

Thank’s @chuckhoupt

mkdir ghblog && cd ghblog
bundle init
bundle add github-pages
# Add some content, like index.html and _config.yml and run:
bundle exec jekyll serve --open-url --livereload

Result Firefox