0

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.

alotropico
  • 1,904
  • 3
  • 16
  • 24
  • 1
    Are you sure you [added it to your path](https://stackoverflow.com/a/26947514/2423164)? – ndnenkov Feb 22 '18 at 18:08
  • Yes, still no luck – alotropico Feb 22 '18 at 18:31
  • 1
    And did you restart your console after you added it? – ndnenkov Feb 22 '18 at 18:35
  • Yes, I even restarted Windows, just in case – alotropico Feb 22 '18 at 20:05
  • @alotropico Are you really sure? if you type `echo %PATH%` into the command prompt is the path to the `ruby` executable in there? If not then it has not been added to your path. How did you install ruby? The easiest way on windows is to use the [Ruby Installer](https://rubyinstaller.org/) and when it asks you about adding it to your PATH say yes. – engineersmnky Feb 22 '18 at 21:27
  • Sorry but I installed with the executable from scratch a couple times, adding my PATH, and the problem persisted. I guess it maybe something odd about my Windows 10 – alotropico Feb 23 '18 at 18:32

1 Answers1

3

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.

Ben Personick
  • 3,074
  • 1
  • 22
  • 29