Jekyll - command not found

后端 未结 15 1826

I am trying to get Jekyll running but I have no experience with Ruby.
As far as I can tell the installation of Jekyll has succeeded.
However:

$ jekyll
         


        
15条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-31 02:35

    When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/.gem/ruby/1.9.1. The commands provided by the gems you installed will end up in ~/.gem/ruby/1.9.1/bin. For the programs installed there to be available for you, you need to add ~/.gem/ruby/1.9.1/bin to your PATH environment variable.

    For example, if you use bash you can add that directory to your PATH by adding code like this to your ~/.bashrc file:

    if which ruby >/dev/null && which gem >/dev/null; then
        PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
    fi
    

    https://guides.rubygems.org/faqs/#user-install

    I put it in the .bash_profile (Mac OS X).

    https://hathaway.cc/2008/06/how-to-edit-your-path-environment-variables-on-mac/

提交回复
热议问题