Jekyll - command not found
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
jekyll installed but 'command not found'
Okay I had to check what exatly does the $PATH means, and for what it is.
The problem was simple, somehow my ruby installion directory wasnt in my $path variable.
Useful links: Mac OS X: Set / Change $PATH Variable
Okay so here is the thing how I solved it:
echo "$PATH"
gem uninstall jekyll
find / -name jekyll (to delete if there is any leftovers somewhere )
gem environment ( get EXECUTABLE DIRECTORY path )
nano $HOME/.bash_profile ( go to the end of document and insert a new line )
export PATH="/usr/local/Cellar/ruby/2.0.0-p247/bin:$PATH"
you can do this on a templorary way by just writing it in terminal and not saving it in your .bash_profile
After installing jekyll, getting -bash: jekyll command not found
I know that when I installed rvm, (or maybe it was during the homebrew install), I received a notice that I have both .profile and .bash_profile and it asked me to add source ~/.profile to .bash_profile could that be the problem?
Yes. Do what it said there and you should have access to the jekyll
command.
user$ echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
Why is my jekyll command not working anymore?
I found a solution, that I think is very not clean, but works for now.
I have two directories in /Library/Ruby/Gems/
:
2.0.0/
gems/
specifications/
...
2.3.0/
gems/
specifications/
...
The error output, when I try to run jekyll, tells that it checks (among others) in /Library/Ruby/Gems/2.3.0
, but as I said in my question, there aren't any jekyll-related file in there.
So, I manually copied all the files from /Library/Ruby/Gems/2.0.0/gems
and /Library/Ruby/Gems/2.0.0/specifications
and pasted them in /Library/Ruby/Gems/2.3.0/gems
and /Library/Ruby/Gems/2.3.0/specifications
respectively.
I guess that the files I've copied are maybe outdated for the Ruby version I have (?), but it works perfectly.
Maybe there is a more conventional way to make it work?
jekyll error / sh: command not found: jekyll
So after @tamouse suggested to run brew doctor I got theses warnings and I managed to fix them and I think this was the main issue after upgrading to OSX 10.9.
After that I installed Ruby using
rvm install ruby-2.0.0-p247
and this fixed the issue.
Thanks every one
Gem does not install Jekyll on Ubuntu 14.04: command not recognized
We have two apparently contradictory pieces of information. On one hand jekyll is installed since the command jekyll -v
is recognized. On the other hand, both the error you get and the gem list
output tell us that your particular version of Ruby doesn't have jekyll installed.
You have a couple of issues to contend with:
- OS vs Gem
- Ruby version
Here is how you can try to solve it:
- Uninstall the apt-get version of jekyll.
- Run
jekyll -v
to verify that you get a command not found error. If it's still a recognized command, run awhich jekyll
andsudo find / -name jekyll
to figure out what's being executed. - With jekyll gone for good, run
ruby -v
and take note of the version you are using. - Install jekyll with
gem install jekyll
(addsudo
if necessary). - If you've closed your shell or switched to a different directory, run
ruby -v
again to make sure you are using the same version as before. - Run
gem list
and this time it should be there. - Run
jekyll -v
again and it should work.
jekyll installed but the terminal diplays : command not found
ok , well I don't what was exactly the reason , but I had to uninstall ruby and reinstall it from scratch as well as python .. I just followed this tutorial and it could help me
https://www.youtube.com/watch?v=EtqZVTIro_c
Related Topics
Why Should I Use Rspec or Shoulda with Rails
Reading the First Line of a File in Ruby
Vcrproxy: Record Phantomjs Ajax Calls with Vcr Inside Capybara
How to Add Two Weeks to Time.Now
Starting or Restarting Unicorn with Capistrano 3.X
Where/How to Include Helper Methods for Capybara Integration Tests
What's the Most Efficient Way to Deep Copy an Object in Ruby
How to Return Multiple Tags from a Rails Helper
Ruby: Put Request with JSON Body
Context Aware Authorization Using Cancan
Testing Actionmailer Multipart Emails(Text and HTML Version) with Rspec
Ruby Concatenate Strings and Add Spaces
Rails Activeadmin - Custom Association Select Box
How to Controller (Start/Kill) a Background Process (Server App) in Ruby
How to Do a Regex Search in Nokogiri for Text That Matches a Certain Beginning