How to run Ruby and GIT commands in one place on Windows
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
How to run git command remotely?
If you literally want to run the command remotely, do it over SSH:
ssh username@host "cd my/repo/path && git show"
Command-line Git on Windows
As @birryree said, add msysgit's binary to your PATH, or use Git Bash (installed with msysgit as far as I remember) which is better than Windows' console and similar to the Unix one.
Git Bash giving sh.exe: ruby: command not found
If you already installed ruby, you have to include correct path.
Right click My Computer
, click Properties
, go to Advanced System Settings
left navigation, click on Environment Variables...
button, go to System Variables
below, select Path
, click Edit
and in the beginning of the path enter: C:\Ruby200\bin;
(Please note that in here you should indicate the ruby executable path. In case you installed ruby using Ruby installer for windows then the above mentioned path is correct).
Hide Command Line when running a Ruby Program
I'm having trouble dissecting the .lnk file, but I believe you can simulate what you want in the command line by running
ruby main.rb &
instead of ruby main.rb
. Once you have that, I think you can create a .bat file with the above line and it should run correctly.
Explanation:
The common reason the command prompt runs is because the command prompt is actually running the game inside itself and waiting for you to finish before completing the "run the game" script. The & says "run the game outside of this command prompt (inside a new thread)". Then after creating the new thread, it sees that it has finished execution of the script and closes itself, leaving your game to run on it's own.
Related Topics
Warning: Constant ::Fixnum Is Deprecated When Generating New Model
How to Convert a Ruby Hash So That All of Its Keys Are Symbols
Flattening Nested Hash to a Single Hash with Ruby/Rails
How to Simulate Java-Like Annotations in Ruby
How to Say Something Happened "X Minutes Ago" or "X Hours Ago" or "X Days Ago" in Ruby
Is There a Natural_Sort_By Method for Ruby
How to Pass Multiple Arguments to a Ruby Method as an Array
Rails 4 Unpermitted Parameters for Array
Unexpected Return (Localjumperror)
Rails 3. How to Display Two Decimal Places in Edit Form
Error: SASS Installation for Windows
How to Require Active Record Working Outside of Rails
How to Uninstall Ruby on Rails on MAC Os X
How to Set Http_Referer When Testing in Rails
Get Index of String Scan Results in Ruby