Skip to content

Instantly share code, notes, and snippets.

@zoras
Created July 28, 2011 17:22
Show Gist options
  • Save zoras/1112020 to your computer and use it in GitHub Desktop.
Save zoras/1112020 to your computer and use it in GitHub Desktop.
install all the packages in cygwin
# install all the packages required for using ruby on rails in cygwin
# http://software.jessies.org/salma-hayek/cygwin-setup.html
# Cygwin is a Linux-like environment for MS Windows. You can read more about it on the Cygwin home page, but this page assumes you know what it is and have already decided that you want it. If you're a Unix user and you're stuck with a Win32 box, you probably do. It's quite a remarkable hack.
Download the Cygwin setup.exe from http://www.cygwin.com/setup.exe
# Packages
inetutils # telnet(1)
ncurses # see Terminator FAQ
openssh # SSH (client and server, though the server's not so great)
ruby # run Perl, Python, or Ruby scripts
vim # edit stuff locally
...
# you can update your installation using "unattended" mode with -q
# Cygwin 1.7's setup.exe introduces a -P switch which takes a list of extra packages. Setup needs to be run from a cmd window, not from bash. Drag the shortcut to setup.exe from your Desktop into the cmd window.
# install all the packages in cygwin
cd path/to/downloads/cygwin/setup.exe
setup.exe -q -P cron,gcc,gcc-g++,inetutils,make,mingw-runtime,ncurses,openssh,patch,ruby,rxvt,subversion,vim,make,automake,git,git-completion,gitk,openssh,ping,openssl,openssl-devel,sqlite,nano,ImageMagick,libmagick-devel,curl,mingw64-i686-gcc-g++,readline,libreadline7,zlib-devel,mintty,zsh
# install apt-cyg http://code.google.com/p/apt-cyg/
svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
chmod +x /bin/apt-cyg
apt-cyg install nano
# install rvm https://rvm.beginrescueend.com/rvm/install/
bash < <(curl -ks https://rvm.beginrescueend.com/install/rvm)
rvm install 1.9.2
rvm use --default 1.9.2
# download latest rubygems
wget http://rubyforge.org/frs/download.php/43985/rubygems-1.3.0.tgz
tar -xzf rubygems-1.3.0.tgz
cd rubygems-1.3.0
#unset RUBYOPT #If you get an error like “No such file to load — ubygems (LoadError)”, all you need to do is run this commented line and run the following from the command line:
ruby setup.rb
gem install rails
# create new rails project and test it
rails test_site
cd test_site
rails s
# install terminator http://software.jessies.org/terminator/
c:\cygwin\bin\rxvt.exe -fn Terminal -scrollBar_right -bg blue4 -fg white -ls --saveLines 9999
# install console2 http://sourceforge.net/projects/console/
# Go to “Settings > Tabs” and click “Add”. You can name the tab anything you’d like (“Cygwin” works just fine). The only thing to do is set the “shell” parameter to:
c:\cygwin\bin\bash --login -i
alias e='cygstart e'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment