I'm trying to follow "Creating a GitHub Pages site with Jekyll" but when I run any of these commands:
$ bundle exec jekyll VERSION new .
$ bundle exec jekyll _4.0.0_ new .
$ bundle exec jekyll 4.0.0 new .
I get this error:
"Could not locate Gemfile or .bundle/ directory"
I have looked at several SO posts related to this error message, but none seem to have a fix for my problem. Perhaps I have missed something?
Some relevant details:
$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
$ jekyll -v
jekyll 4.0.0
$ type rvm | head -n 1
rvm is a function
$ lsb_release -a
LSB Version: core-11.0.1ubuntu1-noarch:printing-11.0.1ubuntu1-noarch:security-11.0.1ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler can be a great tool to use with Jekyll.
bundle exec is a Bundler command to execute a script in the context of the current bundle (the one from your directory's Gemfile). rake db:migrate is the script where db is the namespace and migrate is the task name defined.
The GitHub walk-through left these commands out, but Bundler's bundle init
explains it:
This command is necessary to create the Gemfile:
$ bundle init
and this one to populate it with Jekyll:
$ bundle add jekyll
so that when I re-ran my setup command, it worked:
$ bundle exec jekyll 4.0.0 new . --force
The specific version of jekyll
that GitHub uses can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With