A couple of people have asked me how to get rvm working successfully on windows with cygwin.
I’ll write another post later about how I use devtools to successfully run msys and cygwin side by side from the same set of dotfiles (customized per environment)!
I started with a brand new vm image with the software installed according to the post here.
If you don’t wish to read that previous post just know I installed cygwin to C:\utils\cygwin (for the purpose of this post it you are following along, I would suggest installing to that path also). I also included the following packages (some of these are not necessary for ruby compilation, but they have become my base for a cygwin install):
- unzip – Unzipping zip files
- openssl – bin and sources
- openssh – Only if you are not going to compile openssh yourself
- curl – download internet resources
- gcc-core – compiler
- libtool – Shared library generation tool. You’ll need it when trying to compile rubies
- libncurses-devel – Used when compiling several other tools I use
- openssl-devel – Required for compiling openssh (not necessarily required for rvm, but I always install it to compile openssh myself)
- ncurses – Enabling better handling of terminal
- patch – Apply a diff file to an original. Again, you’ll need it when rvm is trying to patch the ruby installs
Once the cygwin install completes we can continue.
Open up a new cygwin session (C:\utils\cygwin\cygwin.bat).
Issue the following commands in the cygwin session:
1 2 3 4 5 6
The results should look as follows:
- You should now be sitting in the devtools folder so you can now run the kick_off_script:
Repeat the above step(the first time you run it, it creates a settings file for your user that can be edited further if you are going to make further use of devtools later on)
For the curious, the script is here
The script does the following:
- kicks off an rvm installation script
- updates to the latest rvm
- installs a couple of rubies and sets 1.9.3 as the default ruby
The last step takes a little time to complete, but the end result is definitely worth it!!: