如何在Windows上的一个地方运行Ruby和GIT命令 [英] How to run Ruby and GIT commands in one place on Windows
问题描述
我的窗口框上安装了Ruby和GIT。要运行GIT命令,我正在使用GIT Bash。运行Ruby命令我正在使用命令行。
我没有成功地从CMD行运行GIT命令,也不能从GIT内部运行Ruby命令击。我希望能够从GIT Bash(理想)或至少从CMD线上为GIT和Ruby运行命令。
什么是最好的方法解决方案
我从CMD会话中始终运行git命令。
确保您的 PATH
环境变量包含msysgit发行版中的' cmd
'目录:
Path = C:\Path\To\Git\1.7.1\cmd
如果不是,请将其添加到您的会话中:
set PATH =%PATH%; C:\Path\To\Git\1.7.1\cmd
,你就完成了。 Git 和 Ruby命令在你的CMD shell中。
反过来(Ruby命令)可以在Git bash中加入 PATH
类似于 / c / path / to / Ruby / 186-27 / bin
I have Ruby and GIT installed on my windows box. To run GIT commands I am utilizing the GIT Bash. To run Ruby commands I am using the command line.
I have not been successful running GIT commands from the CMD line nor can I seem to run Ruby commands from inside the GIT Bash. I would love to be able to run commands for both GIT and Ruby from the GIT Bash (ideal) or at the least from the CMD line.
What is the best way to go about this?
I run git commands from the CMD session all the time.
Make sure your PATH
environment variable includes the 'cmd
' directory from a msysgit distro:
Path=C:\Path\To\Git\1.7.1\cmd
If not, add it in your session:
set PATH=%PATH%;C:\Path\To\Git\1.7.1\cmd
and you are done. Git and Ruby commands in your CMD shell.
The reverse (Ruby commands) is possible in a Git bash, by adding to the PATH
a value like /c/path/to/Ruby/186-27/bin
这篇关于如何在Windows上的一个地方运行Ruby和GIT命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!