

If you’re using Ruby version 2.7.x, that location is /usr/local/lib/ruby/gems/2.7.0/bin.


The solution is to update your PATH with the location where gems get installed when you are using the Homebrew version of Ruby. Hi and What you are experiencing is a common issue unfortunately due to incomplete documentation on the Jekyll site. I have tried to override Ruby version using the steps in this doc, however that seems to have no effect when running netlify build command locally. It would be helpful to know how others have worked around this and whether or not there is a way to set paths for netlify-cli or tell it which version of ruby to use. It appears that the command is somehow not inheriting the paths of the user which runs the command. When I attempt to run netlify build command, it somehow is picking up the older Catalina version and thus cannot find some gems plugins that were installed in the newer version of ruby. zshrc so that the ruby/gems commands are executed using the newer version. Catalina comes with an older version of ruby pre-installed and brew installs a newer version in a different path, which is set in. This set up allows me to run gulp / jekyll commands without sudo. I am using gulp/jekyll and the latest version of ruby installed using brew. I am having a similar issue for which the cause appears to be the same on MacOS Catalina. SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.7.1_2/etc

SPEC CACHE DIRECTORY: /Users/tkrunning/.gem/specs EXECUTABLE DIRECTORY: /usr/local/lib/ruby/gems/2.7.0/bin RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby USER INSTALLATION DIRECTORY: /Users/tkrunning/.gem/ruby/2.7.0 INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.7.0 PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH" If which ruby >/dev/null & which gem >/dev/null then bash_profile:Įxport PATH="/usr/local/opt/ruby/bin:$PATH" Adding the following to my otherwise empty.usr/local/opt/ruby/bin:/usr/local/opt/ruby/bin:/Users/tkrunning/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/ruby/bin:/Users/tkrunning/binĬan I somehow just make netlify build use zsh, or does it need to use bash? But it’s working just fine in zsh.Įcho $PATH returns the same both from zsh and bash: When I run netlify build I get the following error: bash: jekyll: command not foundįair enough, if I switch to bash with exec bash and run jekyll I get the same error. My system: MacOS, zsh, ruby 2.7.1p83 installed via homebrew, jekyll 4.0.0 I’m getting stuck at something that should probably be very easy to deal with… But for some I’m not able to figure out what I need to solve it.
