A Word About Git, IDEs and Editors
Git is distributed version control system. Distributed in case of source control management (SCM) system means that whenever you clone some repository you get complete history on your disk. Despite its youth Git quickly became very popular among Ruby, and not only Ruby, developers. Its popularity influenced Ruby extensions packaging system, Rubygems, to implement extension installation directly from Git repositories. Due to these facts it is recommended to install Git on Windows.
There are several ports of Git to Windows but main difference comes from their underlying environments - Cygwin or MSYS. If you plan to use Ruby on Windows be careful not to use Cygwin based version. Even more, it is recommended not to keep Cygwin in the path at all and to remove all Cygwin configuration files from user home directory before you go on. If you don't do this you might face various kind of errors due to incompatibility of Cygwin and MSYS-MinGW tools.
I will not write much about Git here. There are lot of on-line resources and books that cover it already, but there is one point that needs your attention. It is recommended to select option “Run Git from the Windows Command Prompt” during installation. This way your Ruby scripts and Rubygems will have Git always available since it will be added to the path. As already stated, it is good to keep MSYS and MinGW tools in the paths without spaces so we will install it in the C:\Git
.
Now when Git is installed we will add it to the ConEmu. Open ConEmu Setup tasks dialog by clicking on drop-down icon beside green icon with plus sign in the upper right corner of ConEmu window (Figure 1-5) and clicking on Setup tasks item.
In the dialog click on the button with plus sign enter title 'Git' in the first text box, set Ctrl-G
for hotkey and in the text box for command enter following:
C:\Windows\System32\cmd.exe /c ""C:\Git\bin\sh.exe" --login -i"
Be careful to change path to Git to point to the path where you installed it and to put all quotes as given in the sample. If you followed all the instructions for ConEmu and Git you can now open new Git bash shell with Ctrl-G
key combination or through same dropdown which we used for opening settings dialog.
Even though chapter's title mentions Integrated Development Environments (IDEs) and editors I will not recommend any of them for several reasons, among which the most important is that developers usually have their favorite IDE or editor and they are not willing to change it. Besides, question “What is the best IDE or editor for Ruby development” is asked from time to time on various mailing lists and it has almost as many different answers as replies.
The fact is there are just a few IDEs for Ruby development and Eclipse is one of the free ones. Problem is that it does not support Ruby 1.9 and later versions. So if you want to work with Ruby 1.8 and really want to work in IDE you can give it a try.
On the other hand, status with editors is quite different. Most of the Windows editors support Ruby syntax highlighting. Some of them even have a capability to execute Ruby script that is currently edited. So which one to choose? If you ask Mac users most of them will recommend TextMate. Still there are lot of them which use Vim or Emacs. On the Linux Vim and Emacs are probably most used but GEdit also has good Ruby support. New GitHub's Atom is one worth trying too. Sublime Text is also excellent choice if you are considering commercial editors.
Windows developers are not familiar with Vim and Emacs but that is not a reason not to try them. Personally I use Emacs for everyday Ruby development among other things. Main reason why I have chosen Emacs is because I develop on Linux beside Windows so I wanted editor which is free, rich of features and can be used on most popular operating systems today. If you decide to use Emacs you can check my customisation files in GitHub project boem.
If you are not willing to put some effort to learn Vim or Emacs you can check SciTe, Notepad++, Atom or Sublime Text 3. Bottom line is you should use the tool that you are most comfortable with but effort needed to get used to new tools shouldn't stop you while you are searching for your editor of choice.