Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot build or serve Jekyll site on OSX

Tags:

macos

ruby

jekyll

I am running OS X 10.11.6 and I installed Jekyll (using the already existent ruby on my system) by the recommended method: sudo gem install -n /usr/local/bin/ jekyll.

I can happily run jekyll on my system so I made a new site by running jekyll new TestSite which successfully executed.

However, this is where it stops working: if I cd into the site directory and run any jekyll command I get the following error:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.2.1/lib/jekyll/plugin_manager.rb:34:in `require_from_bundler'
    from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.2.1/exe/jekyll:9:in `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'

Any ideas how to get it working?

like image 935
harryg Avatar asked Mar 11 '23 13:03

harryg


1 Answers

It seems you don't have bundler gem. Try

gem install bundler

like image 75
Ursus Avatar answered Mar 15 '23 00:03

Ursus