Jekyll - command not found

后端 未结 15 1822

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:43

    I installed my ruby2.6.0 and gem via brew on MacOS 10.14.
    For me, add the following line to my ~/.zshrc solved this issue.

     export PATH=/usr/local/lib/ruby/gems/2.6.0/bin:$PATH
    

    I found jekyll executable file with command locate jekyll.

    0 讨论(0)
  • 2021-01-31 02:47

    The easiest method of doing this is to use RVM. It manages Ruby and all its gems for you and it's easy to use. See this link for using it.

    If you did not want to use that you will need to modify your PATH variables so it can find your gems. I have found this to be tedious and reverted to RVM, but here are the general steps.

    You will need to find out where your gems are getting installed. If you did gem install ... the gems will be in ~/.gem/ruby/1.8/gems/bin, if you used sudo gem install ... the gems will be somewhere in /System/Library/Frameworks/Ruby.framework/Versions/1.8/Resources

    You have to add this path to your PATH variable. Easiest way to do this is by running : echo 'PATH=$PATH:above/path/to/gems' >> ~/.bash_profile

    0 讨论(0)
  • 2021-01-31 02:47

    Maybe a little late, but... I had some trouble to install Jekyll on Ubuntu and tried everything that people answered in this thread - unfortunately nothing worked.
    Then, I watched a video on Jekyll's site and after installing the whole ruby package again, sudo gem install jekyll worked.

    Try it before anything else:

    sudo apt-get update
    
    sudo apt-get install ruby-full
    
    sudo gem install jekyll
    
    jekyll -v
    

    It seems pretty simple, but it works on Ubuntu.

    0 讨论(0)
  • 2021-01-31 02:47

    In my case I had to run bundle install --force

    Then bundle exec jekyll serve works, but jekyll serve still doesn't. It seems I'll have to go with the former from now on…

    0 讨论(0)
  • 2021-01-31 02:50

    Following steps solved my problem

    gem uninstall jekyll
    sudo gem install jekyll
    

    Open ~/.bash_profile and add this code in the last line,

    export PATH=$PATH:/usr/local/lib/ruby/gems/1.9.1/gems/jekyll-2.5.2/bin
    

    Save and close the .bash_profile

    Close and reopen the mac terminal, try running jekyll now, it should work

    0 讨论(0)
  • 2021-01-31 02:50

    For me, I followed this installation guide instead of their main page's installation instruction. It worked after I changed the bash_profile file and restarted Terminal.

    0 讨论(0)
提交回复
热议问题