I'm trying to create a Jekyll project with the Chirpy theme on macOS, and I've completed the steps in this setup guide until where I have to run bundle
. When I run bundle
, this happened:
$ bundle
[!] There was an error parsing `Gemfile`: Undefined local variable or method `init' for Gemfile. Bundler cannot continue.
# from [Project Dir]/Gemfile:1
# -------------------------------------------
> bundle init
#
# -------------------------------------------
Gemfile:
bundle init
gem "jekyll"
Versions:
$ gem --version
3.0.3
$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin19]
$ bundle --version
Bundler version 2.2.17
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H2
Other Info
I installed ruby using
rbenv
following this answer rather than using the stock ruby from Xcode, because the stock ruby was throwing the'ruby/config.h' file not found
error.I used
gem install --user-install bundler jekyll
to install bundler and jekyll.