How do I add Ruby to the PATH variable on Windows?

前端 未结 7 1997
梦如初夏
梦如初夏 2020-12-01 16:16

I have Ruby installed, but I still need to add it to the PATH variable. I found something online for how to manually add it using the command line:

set PATH=         


        
7条回答
  •  Happy的楠姐
    2020-12-01 16:38

    For CLI, as noted elsewhere calling SET on the path variable only acts on the current window and closing it or restarting windows voids the change.

    Example the transient Version selected as the answer:

    set "PATH=%PATH%;C:\Ruby200-x64\bin"
    

    To correctly set the path permanently in CLI use the path command:

    PATH %PATH%;C:\Ruby200-x64\bin
    

    This will persist between CMD windows and after reboots.

提交回复
热议问题