Error Running "Jekyll Serve" - jekyll

Jekyll was working fine but I must have done something and caused below error. Searched other posts but don't see the answers.
Does anybody know how to fix the problem?
Edgars-MacBook:Site edgaryp$ jekyll serve
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem jekyll (>= 0.a) (Gem::GemNotFoundException)
from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems.rb:298:in `activate_bin_path'
from /usr/local/bin/jekyll:22:in `<main>'

As I see the output says can't find gem jekyll (>= 0.a) (Gem::GemNotFoundException)
So according of what at least gem list --local says you must have the jekyll gem and all its main dependencies jekyll-sass-converter and jekyll-watch.
If you see them and not the jekyll one you may consider reinstalling it, or:
# if it is or exists
$ gem uninstall jekyll & gem install jekyll
Or also exists the possibility to download from Rubygems.org and install it, this if you want some specific version.
$ wget https://rubygems.org/downloads/jekyll-3.4.3.gem && gem install jekyll-3.4.3.gem

Related

jekyll error building page related to kramdown parser

Whenever I run the bundle exec jekyll serve it returns the error
Dependency Error: Yikes! It looks like you don't have kramdown-parser-gfm 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 -- kramdown-parser-gfm' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
Liquid Exception: kramdown-parser-gfm in /_layouts/default.html
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
kramdown-parser-gfm
so, I tried gem install kramdown-parser-gfm, but it returns the same error after that.
I also tried to remove and reinstall the jekyll and bundle, but didn't work either.
jekyll version 3.9.0 Bundler version 2.1.4
I added gem "kramdown-parser-gfm" to the Gemfile and then ran bundle install.
Now the serve command completes successfully.
delete the Gemfile.lock file
go to gem file add gem "kramdown-parser-gfm"
open terminal and give command bundler
after install all packages, in terminal give command bundle exec jekyll serve
I hope application will run properly now.
On Windows
If you open your gemfile, you will notice the following.
gem "jekyll", "~> 3.2.1"
If you have the specific jekyll version and after running "bundler", you will receive the following errors.
Bundler could not find compatible versions for gem "kramdown":
In Gemfile:
jekyll (~> 3.2.1) was resolved to 3.2.1, which depends on
kramdown (~> 1.3)
kramdown-parser-gfm was resolved to 1.1.0, which depends on
kramdown (~> 2.0)
Remove the specific version of jekyll, like so:
gem "jekyll"
Do not forget to add webrick gem to gemfile
gem "webrick"
Run bundler again.
bundler
Finally, serve
bundle exec jekyll serve --livereload
What worked for me was to add:
gem "rexml"
to the Gemfile.

Deploying jekyll app on Cloudcannon fails

I am trying to deploy my jekyll app on the Cloudcannon CMS platform for Jekyll, but my build fails with this output:
Syncing raw files... done
Checking existing local bundle state... failed
Loading gem cache...
Checking gem cache (bundle_cache/Jw8rkIm9v3Cmawv2raEpkN96fz3R5X1Q_XMn7xpGB1s.zip)... no cache
$ export JEKYLL_ENV="production"
$ ruby -v
ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
$ bundle version
Bundler version 2.0.1 (2019-01-04 commit d7ad2192f)
$ bundle config --global jobs 4
Configured concurrent installs!
$ bundle install
Using local cacheable path...
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
jekyll-feed-0.12.0 requires ruby version >= 2.4.0, which is incompatible with
the current version, ruby 2.3.8p459
What am I doing wrong and how can I update the ruby version correctly?
My Gemfile looks like this:
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.5"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 2.4.0"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?
I tried to change the jekyll-feed version and bundle it again but it gave me the same results and I don't want to remove that plugin because I need it.
The issue could be from your Gemfile.lock.
The latest version of jekyll-feed is 0.12.1
Correct your Gemfile to point to any version of jekyll-feed greater than or equal to 0.12.0:
gem "jekyll-feed", "~> 0.12"
The run bundle update so that the new version is installed and included in your Gemfile.lock
Then commit and push your updated Gemfile and the Gemfile.lock into your remote repository.
Jordan from CloudCannon here.
ashmaroli is correct, you're referencing an invalid version number for jekyll-feed. Following ashmaroli's steps should resolve the problem.
As a side note, we'll be adding support for multiple Ruby versions within the next month or two. This will resolve any future incompatibilities with plugins that require a later version of Ruby.
If you have any more questions feel free to contact us, we're more than happy to help :)

Jekyll cannot load such file -- jekyll-watch

All of the sudden I get this error when I run jekyll serve.
cannot load such file -- jekyll-watch
Dependency Error: Yikes! It looks like you don't have jekyll-watch 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 fro
m Ruby is: 'cannot load such file -- jekyll-watch' If you run into trouble, you can find helpful resources
at http://jekyllrb.com/help/!
I've got no clue how to fix this. Does someone else have this problem?
gem list jekyll-watch show me
* LOCAL GEMS *
jekyll-watch (1.2.1)
I have this problem and solved below command line
gem install GEM_NAME_HERE
if you run in after OSX el Capitan use blow command line
sudo gem install -n /usr/local/bin GEM_NAME_HERE

Jekyll serve didn't work: It looks like you don't have pygments or one of its dependencies installed

Configuration file: /Users/andrechristoga/Documents/type-theme/_config.yml
Deprecation: You appear to have pagination turned on, but you haven't included the `jekyll-paginate` gem. Ensure you have `gems: [jekyll-paginate]` in your configuration file.
Source: /Users/andrechristoga/Documents/type-theme
Destination: /Users/andrechristoga/Documents/type-theme/_site
Incremental build: disabled. Enable with --incremental
Generating...
Dependency Error: Yikes! It looks like you don't have pygments 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 -- pygments' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!
Liquid Exception: pygments in /Users/andrechristoga/Documents/type-theme/_posts/2014-11-28-markdown-and-html.md
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
pygments
These are the message when I type jekyll serve.
I had the same issue but fixed it installing pygments gem.
gem install pygments.rb
And adding it to my Gemfile.
gem 'pygments.rb'
if you are a windows user, you could run CLI as administrator. This would help.
If you use the command sudo gem install pygments.rb or gem install pygments.rb, it may not works
So you can try root:
su root
gem install pygments.rb
This fix my problem.

Jekyll serve -w Issue

I am using the jekyll with git-hub-pages on Win7, however no matter what I do the
jekyll serve --watch or
jekyll serve -w
won't start the server (the jekyll serve is working fine).
the produced error has something to do with
custom_require.rb:36 - cannot load such a file --wdm
How can I fix it?
As shown in the error message, wdm is not found.
First, update your gems
gem update
Then, manually install wdm
gem install wdm