What to do if you get rails: command not found
From DevchixWiki
Under some circumstances, when creating the Rails test app, you may get the following error:
sh.exe": rails: command not found
The solution is (you guessed it) reboot the machine.
Technical details: git bash is a child process of Windows explorer. The Ruby installer adds C:/Ruby/bin (where rails is located) to your Windows PATH environment variable, but currently running Windows explorer processes may not pick up the change until a reboot.

