gem install rails -y doesn't work with ruby 2.1.6 in Windows 8 -


hi experts ruby.

i'm pretty new on fantastic , funny language, meet error command prompt.

i typed, because win8, gem install rails -y system said: "gem" not batch command or file , bla bla bla..

why this?

how can resolve?

this happens if didn't check “add ruby executables path” box during ruby installation process. in case environment won’t know ruby installation situated. there 2 ways can fix this:

1. can try reinstalling ruby.

remember check "add ruby executables path" box during installation process.

2. can try fix manually:

start menu -> right click on computer -> properties -> advanced system settings (in left panel) -> advanced tab -> environment variables button

in user variables section, double click on path (or select path , press edit).

if there else there put semicolon after ; , add path ruby bin folder

example c:\ruby193\bin or c:\ruby200\bin

then press ok

note: 3 digits version of ruby installation. go c: drive , check name of ruby folder.

now in system variables section, press new. variable name enter rybuopt , variable value rubygems press ok on small window , on other 2 remained opened.