I use ubuntu 19.04.
jekyll v 3.0
What am I doing wrong
ilya#ilya-TM1701:~/Desktop/prsng.ru$ bundle exec jekyll s
/var/lib/gems/2.5.0/gems/jekyll-3.0.0/lib/jekyll/hooks.rb:54: warning: constant ::Fixnum is deprecated
Configuration file: /home/ilya/Desktop/prsng.ru/_config.yml
Source: /home/ilya/Desktop/prsng.ru
Destination: /home/ilya/Desktop/prsng.ru/_site
Incremental build: disabled. Enable with --incremental
Generating...
AutoPages: Disabled/Not configured in site.config.
bundler: failed to load command: jekyll (/usr/local/bin/jekyll)
NoMethodError: undefined method `validate_data!' for #<Jekyll:Page #name="index.html">
The validate_data method was introduced in Jekyll 3.1.0
So, you'll have to update your Jekyll version.
Moreover, Jekyll 3.0.0 was released in October 2015. There has been numerous security fixes since then. Therefore, I strongly recommend updating Jekyll to at least v3.8.6. You can do so by running the following command:
gem install jekyll --version 3.8.6
Or simply install the latest release (v4.0.0) by running:
gem update jekyll
Related
So I've been building a blog site using Jekyll and an specific theme called Chirpy, and deploying it all using Cloudflare Pages, the code is stored in a private Github repository so anytime I push code a new build gets generated by Cloudflare automatically.
It's been working fine for months but after some updates deploying a new build fails as:
12:57:58.188 Success: Finished cloning repository files
12:57:58.890 Installing dependencies
12:57:58.901 Python version set to 2.7
12:58:03.233 v12.18.0 is already installed.
12:58:04.608 Now using node v12.18.0 (npm v6.14.4)
12:58:04.922 Started restoring cached build plugins
12:58:04.937 Finished restoring cached build plugins
12:58:05.597 Attempting ruby version 2.7.1, read from environment
12:58:09.668 Using ruby version 2.7.1
12:58:10.041 Using PHP version 5.6
12:58:10.042 Started restoring cached ruby gems
12:58:10.060 Finished restoring cached ruby gems
12:58:10.062 Installing gem bundle
12:58:10.368 [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path '/opt/buildhome/cache/bundle'`, and stop using this flag
12:58:10.526 [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs`
12:58:13.673 Fetching gem metadata from https://rubygems.org/..........
12:58:13.834 Fetching gem metadata from https://rubygems.org/.
12:58:13.935 Resolving dependencies...
12:58:14.019 sass-embedded-1.58.0-x86_64-linux-musl requires rubygems version >= 3.3.22,
12:58:14.019 which is incompatible with the current version, 3.1.2
12:58:14.052 Error during gem install
12:58:14.073 Failed: build command exited with code: 1
12:58:14.848 Failed: an internal error occurred
Now Cloudflare allows you to specify which command you want to use in order to execute the build, that being:
bundle exec jekyll b
I've been looking for a way to update the Ruby version being used in Cloudflare and could not find any resources more than this one post. I've tried changing the Gemfile like:
spec.required_ruby_version = ">= 3.0"
, but it seems like Cloudflare does not support Ruby 3 at all; I then had the idea to use an older version of the Chirpy theme, since I already have a deployed version of the blog, I went back to Chirpy 5.2.1 but surprisingly the error persist.
Definitely adding gem "jekyll-sass-converter", "~> 2.0" to the Gemfile solved this problem, as Christian mentioned.
Hello Jekyll support users
I need serve this repository on Jekyll, but I has this error on Ubuntu 17.04 Terminal
geraldo#geraldo-Dell-System-XPS-L322X:~/Documentos/activate.mozilla.community$ bundle exec jekyll serve --config ./_config-dev.yml
/var/lib/gems/2.3.0/gems/jekyll-3.4.3/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.3.0/gems/jekyll-3.4.3/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
Configuration file: ./_config-dev.yml
Configuration file: ./_config-dev.yml
jekyll 3.1.6 | Error: uninitialized constant Jekyll::Filters::URLFilters
Anyone here to help me?
I had this problem and it turned out to be that I was using Jekyll from Ubuntu (giving version 3.1.6, as you have) instead of a recent one (such as 3.6.2). Removing jekyll with:
sudo apt-get remove jekyll
and then strictly using bundle cleared things up. Also maybe try bundle update.
I'm newbie to Ruby and Jekyll. Recently I've tried to install Jekyll Multiple Languages Plugin onto my GitLab Pages instance. I've managed to successfully add
'gem install jekyll-multiple-languages-plugin
bundle install'
into the .gitlab-ci.yml but when I try to add
gems:
jekyll-multiple-languages-plugin
into _config.yml in order to use it on the site my commit fails with the following error:
Using jekyll-watch 1.5.0
Using jekyll 3.4.3
Bundle complete! 3 Gemfile dependencies, 20 gems now installed.
Bundled gems are installed into /usr/local/bundle.
$ jekyll build -d public
Configuration file: /builds/myusername/forty-jekyll-theme/_config.yml
Dependency Error: Yikes! It looks like you don't have jekyll-multiple-languages-plugin or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-multiple-languages-plugin' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 3.4.3 | Error: jekyll-multiple-languages-plugin
ERROR: Job failed: exit code 1
I have used this method because any attempt to edit Gemfile ends up in commit error. I've also tried to do all presented steps except adding bundle install. In that case I get the same error, but the beginning looks like:
18 gems installed
$ gem install jekyll-multiple-languages-plugin
Successfully installed jekyll-multiple-languages-plugin-1.5.1
1 gem installed
$ jekyll build -d public
I did not manage to find the way to solve it on Stack Overflow nor other sites. For example this did not help
With the awesome support of allejo from Jekyll's IRC channel I've managed to solve the problem. Here are the steps:
I've used Gemfile. Now it looks like
source 'https://rubygems.org'
gem 'jekyll'
group :jekyll_plugins do
gem 'jekyll-multiple-languages-plugin'
end
The second modified thing was .gitlab-ci.yml (the first line - image: ruby - is also included)
image: ruby
pages:
stage: build
script:
# - gem install jekyll
- gem install bundler
# - gem install jekyll-multiple-languages-plugin
- bundle install
- bundle exec jekyll build -d public
# - jekyll build -d public
artifacts:
paths:
- public
only:
- master
It produced a bug, but it was only caused by the lack of declared language which is part of standard plugin configuration.
I am working on a Chromebook, where I have setup a debian chroot.
I ran the following commands with no problems:
$ gem install jekyll
$ jekyll new myblog
$ cd myblog
When running:
~/myblog $ jekyll serve
I receive the following error:
/home/damon/.rvm/gems/ruby-2.2.0/gems/liquid-2.6.1/lib/liquid/htmltags.rb:43: warning:
duplicated key at line 46 ignored: "index0"
Configuration file: /home/damon/myblog/_config.yml
Source: /home/damon/myblog
Destination: /home/damon/myblog/_site
Generating...
Liquid Exception: Failed to get header. in _posts/2014-12-28-welcome-to-jekyll.markdown
jekyll 2.5.3 | Error: Failed to get header.
I have tried changing Ruby versions from 2.2 and 1.9.
Does anyone have an idea one how to resolve this issue?
Please let me know if you need any further information.
Most likely you haven't installed Python 2.7.3 - Do not install Python 3 since Pygments (the highlighter) doesn't support Python 3. See related Github Issue here.
A re-install of Python can also fix it.
It is my first time using Jekyll. Running jekyll server gives me this error:
Configuration file: h:/jekyll_demo/myblog/_config.yml
Source: h:/jekyll_demo/myblog
Destination: h:/jekyll_demo.myblog/_site
Generating... error: Invalid argument - h:/jekyll_demo/myblog/_site/h:. use --trace to view backtrace
ruby is 1.9.3p545
jekyll is 1.4.3
pygments.rb is 0.5.0
When run jekyll server --trace, it shows this message:
C:\Users\Administrator> jekyll server --trace
Configuration file: none
Source: C:/Users/Administrator
Destination: C:/Users/Administrator/_site
Generating...
C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/ site.rb:145:in open': Permission denied - . (Errno::EACCES)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb :145:in entries'
Because Jekyll 1.4.3 is broken on Windows, this is a known issue.
v1.4.3 is broken on Windows #1948
What you can do is to install Jekyll 1.4.2 instead of using the latest one. Or use Linux/Mac, because Jekyll doesn't support Windows officially.
gem install jekyll --version "=1.4.2"