简体   繁体   中英

Updated my path and now my program can't find my gems

I was having some trouble installing the gem libv8. Apparently I need to have python installed. I installed Python and was attempting to update my path with command from another forum:

SET PATH=C:[Ruby Directory]\\bin;C:[Python Directory]

or in my case:

SET PATH=C:\\Ruby192\\bin;C:\\Python27

I am not strong with paths and I can't figure out what I did. Now my environment can't find my Ruby directory.

Can someone explain what I did and how I might fix it?

That is most likely because your PATH variable already had a bunch of stuff that you simply throwed away with that line:

echo %PATH%
# a bunch of stuff
SET PATH=C:\Ruby192\bin;C:\Python27
echo %PATH%
# C:\Ruby192\bin;C:\Python27

You can try to append to it instead instead:

set PATH=%PATH%;C:\Ruby192\bin;C:\Python27
echo %PATH%
# a bunch of stuff plus C:\Ruby192\bin;C:\Python27

This change will be avalid for your terminal session only. Closing it and open again should restore the default path. If you need to make it permanent, you need to change your path throught the windows (for example, following this instructions )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM