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
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
.
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
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.
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…
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
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.