public
Created — forked from zoras/cygwin_setup.txt

install all the packages in cygwin

  • Download Gist
cygwin_setup.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
 
# Install all the packages required for using ruby on rails in cygwin
# Cygwin is a Linux-like environment for MS Windows.
 
# Download the Cygwin setup.exe from http://www.cygwin.com/setup.exe
 
# Few packages name and description
# 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
# ...
# If you want to install more packages, head to this url http://www.cygwin.com/packages/
 
# 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 -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
 
# Install RubyGems 1.8.6
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.6.tgz
tar xzf rubygems-1.8.6.tgz
cd rubygems-1.8.6
ruby setup.rb
# If you get an error like “No such file to load — rubygems (LoadError)”, all you need to do is run this commented line and run the following from the command line: use the next unset RUBYOPT cmd
# unset RUBYOPT
cd ..
rm -rf rubygems-1.8.6*
 
# To verify, just run gem -v and it should show you the version 1.8.6
 
gem install bundler rails
 
# create new rails project and test it
rails new test_site
cd test_site
bundle install
rails server
 
# and open http://localhost:3000 on your browser
 
# Terminal, alternative to unix bash terminal for windows
# 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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.