Error "bash: ruby: command not found"

1

I'm trying to install Ruby on Rails on Windows, but I install and whenever I try to use Git BASH in the "Sites" folder that is created in the installation, this error appears. How can I fix it?

Command that I try to run: ruby -v

    
asked by anonymous 17.07.2017 / 22:41

1 answer

0

Most likely the program will not be listed on your PATH .

You need to check the folder where Ruby was installed, for example:

  

C: \ Ruby22-x64

Uncovered this, you need to add the bin folder to your path .

Mode 1:

Go to% w / ⊞ Win + R and type:

  

SystemPropertiesAdvanced

Then click on:

  

Environment Variables )

And then within executar ( User variables in English), double-click Variáveis de usuário , click "New" add the following line (replacing the path of your installation):

  

C: \ Ruby22-x64 \ bin

Mode 2:

No Path , enter:

  

echo% path%> path.txt

To have a backup of the current prompt de comando and then:

  

setx path "% path%; C: \ Ruby22-x64 \ bin"

Replacing, of course, the address of your installation.

Beware of the setx command - it can delete your path!

    
18.07.2017 / 01:27