title: Why is my jekyll command not working anymore?
body: <p>I've recently discovered that the <code>jekyll</code> command doesn't work anymore on my computer, after perfectly using it for several months.</p>
  
  <p>Whenever I try to run a <code>jekyll</code> command, it says:</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs':
      Could not find 'jekyll' (&gt;= 0) among 34 total gem(s) (Gem::LoadError)
  Checked in 'GEM_PATH=/Users/Mael/.gem/ruby/2.3.0:/Library/Ruby/Gems/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0',
      execute `gem env` for more information
      from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
      from /usr/local/bin/jekyll:22:in `&lt;main&gt;'
  </code></pre>
  
  <p>I'm on macOS Sierra (10.12.6).</p>
  
  <h1>Xcode is installed</h1>
  
  <p>I have Xcode installed on my computer:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ xcode-select --install
  xcode-select: error: command line tools are already installed, use "Software Update" to install updates
  </code></pre>
  
  <h1>Reinstalling Jekyll</h1>
  
  <h2>Checking ruby version and (re)installing bundler</h2>
  
  <p>So I tried reinstalling Jekyll as I did the first time:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ ruby -v
  ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin16]
  
  $ sudo gem install bundler
  Successfully installed bundler-1.17.1
  Parsing documentation for bundler-1.17.1
  Done installing documentation for bundler after 4 seconds
  1 gem installed
  </code></pre>
  
  <h2>Creating a Gemfile</h2>
  
  <p>I created a Gemfile which contains:</p>
  
  <pre class="lang-none prettyprint-override"><code>gem 'github-pages'
  source 'https://rubygems.org'
  </code></pre>
  
  <h2>Bundle install (here come the issues)</h2>
  
  <p>And ran, in the directory that contains the Gemfile:</p>
  
  <pre class="lang-none prettyprint-override"><code>$ bundle install
  </code></pre>
  
  <p>Here, the installation doesn't work, it says:</p>
  
  <pre class="lang-none prettyprint-override"><code>An error occurred while installing commonmarker (0.17.13), and Bundler cannot continue.
  Make sure that `gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'` succeeds before bundling.
  
  In Gemfile:
    github-pages was resolved to 192, which depends on
      jekyll-commonmark-ghpages was resolved to 0.1.5, which depends on
        jekyll-commonmark was resolved to 1.2.0, which depends on
          commonmarker
  </code></pre>
  
  <p>So I tried the <code>gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'</code> command, and it says:</p>
  
  <pre class="lang-none prettyprint-override"><code>Building native extensions.  This could take a while...
  ERROR:  Error installing commonmarker:
          ERROR: Failed to build gem native extension.
  
      current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181112-6105-u9aca2.rb extconf.rb
  creating Makefile
  
  current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
  make "DESTDIR=" clean
  
  current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
  make "DESTDIR="
  make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin16/ruby/config.h', needed by `arena.o'.  Stop.
  
  make failed, exit code 2
  
  Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13 for inspection.
  Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-16/2.3.0/commonmarker-0.17.13/gem_make.out
  </code></pre>
  
  <p>I noticed that I have several <code>jekyll</code> and <code>github-pages</code> <em>gems</em> in my <code>/Library/Ruby/Gems/2.0.0/gems</code> <strong>(2.0.0)</strong> directory:</p>
  
  <pre class="lang-none prettyprint-override"><code>github-pages-146
  github-pages-health-check-1.3.5
  ...
  jekyll-3.4.5
  jekyll-avatar-0.4.2
  jekyll-coffeescript-1.0.1
  [and several other jekyll directories]
  ...
  </code></pre>
  
  <p>But not in my <code>/Library/Ruby/Gems/2.3.0/gems</code> <strong>(2.3.0)</strong> directory! (the one which seems to be targeted by the <code>GEM_PATH</code> when running a <code>jekyll</code> command)</p>
  
  <p>So, maybe I did something that changed the version or something. (I've recently installed <code>osxfuse</code> and <code>sshfs</code> (via brew), I don't know if it has anything to do with the issue?)</p>
  
  <p>I don't know anything about Ruby, Gems system, and so on. Maybe the solution is obvious but I've tried several things with no success.</p>
  
  <p>(Sorry it's a bit long but I wanted to be as clear as possible!)</p>