Search code examples
rubywindowscmdjekyll

ruby command is not recognized on Windows (The system cannot find the path specified)


After a fresh install of ruby for Windows 64x, I was able to install gems with no problem, but the "ruby" command itself is not recognized, which I need to setup ruby devs and install jekyll.

EDIT:

In case someone else is in my situation, the thing that finally worked for me was to uninstall ruby and make a clean installation with the 2.2.6 version of the installer (https://rubyinstaller.org/downloads/). Then I was able to install Sass, Ruby devKit and Jekyll. The executable of Ruby 2.4.3 just won't work.


Solution

  • It sounds like Ruby is not in the path.

    Try specifying the full path to the Ruby Executable.

    "C:\Your\Path\To\Ruby\Install\Ruby.exe"
    

    assuming that works edit the path variable to add Ruby's path:

    Path %PATH%;C:\Your\Path\To\Ruby\Install
    

    That will then allow Ruby to run directly by just typing the executable's name.