Skip to content

Cannot Run Jekyll in Mac OS High Sierra #6637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
pcabrera83 opened this issue Dec 16, 2017 · 2 comments
Closed
2 tasks done

Cannot Run Jekyll in Mac OS High Sierra #6637

pcabrera83 opened this issue Dec 16, 2017 · 2 comments
Labels
frozen-due-to-age stale Nobody stepped up to work on this issue. support This is a question about Jekyll's usage.

Comments

@pcabrera83
Copy link

pcabrera83 commented Dec 16, 2017

  • I believe this to be a bug, not a question about using Jekyll.
  • I am on (or have tested on) macOS 10+

My Reproduction Steps

I am having an issue running my Jekyll project. At first, I thought I did something wrong but I cloned the repository on GitHub to my local machine and I see the same error message.

Below I reproduced my steps. Can anyone help?

Steps

  1. git clone https://github.com/jekyll/jekyll.git
  2. Ran jekyll serve
  3. Received Error Message: -bash: /usr/local/bin/jekyll: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
  4. ran jekyll doctor
  5. Received Error Message: -bash: /usr/local/bin/jekyll: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

MacBook Pro (Retina, 13-inch, Early 2015)
macOS High Sierra
Version 10.13.2

The Output I Wanted

I want to run my project.

@DirtyF
Copy link
Member

DirtyF commented Dec 17, 2017

Ruby 2.0 is not supported anymore. You have to update your system.

I also run macOS High Sierra and I suggest you update your 💎 Ruby to 2.4 with brew and rbenv.

All it takes is few command lines:

  1. First install Homebrew if you haven't:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Then run this script to install ruby-buildand rbenv packages:
curl https://gist.githubusercontent.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3/raw/bbac59647ac66016cf443caf7d48c6ae173ae57f/setup-rbenv.sh | bash
  1. Wait few minutes for the script to download and install the different packages…
brew update
Updated Homebrew from 67c4402634 to b4d43e950f.
...
brew install rbenv ruby-build
installing… rbenv 1.1.1
installing… ruby-build 20171215
rbenv install 2.4.3
ruby-build: use openssl from homebrew
Downloading ruby-2.4.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.3.tar.bz2
Installing ruby-2.4.3...
ruby-build: use readline from homebrew
Installed ruby-2.4.3 to /Users/frank/.rbenv/versions/2.4.3
rbenv global 2.4.3
  1. When it's done, check your ruby install:
ruby -v
ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-darwin17]
  1. Install bundler and jekyll gems:
gem install jekyll bundler
Fetching: jekyll-3.6.2.gem (100%)
Successfully installed jekyll-3.6.2
Fetching: bundler-1.16.0.gem (100%)
Successfully installed bundler-1.16.0

Check you run latest jekyll:

$ jekyll -v
jekyll 3.6.2

Update rubygems:

gem update --system
Updating rubygems-update
Fetching: rubygems-update-2.7.3.gem (100%)
Successfully installed rubygems-update-2.7.3
Installing RubyGems 2.7.3
Bundler 1.16.0 installed
RubyGems 2.7.3 installed
Regenerating binstubs
RubyGems system software updated

If you use a Gemfile in your projects, you will just have to run bundle update to update jekyll and all related themes ans plugins.

If you want to upgrade your global jekyll command:

gem update jekyll

You have now an up to date Ruby and Jekyll install on macOS.
Happy Jekyllin'!

@DirtyF DirtyF added the support This is a question about Jekyll's usage. label Dec 17, 2017
@jekyll jekyll locked and limited conversation to collaborators Dec 17, 2017
@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the 3.3-stable or master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale Nobody stepped up to work on this issue. label Mar 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age stale Nobody stepped up to work on this issue. support This is a question about Jekyll's usage.
Projects
None yet
Development

No branches or pull requests

4 participants