Skip to content

Instantly share code, notes, and snippets.

@geedelur
Created July 30, 2012 16:13
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save geedelur/3208130 to your computer and use it in GitHub Desktop.
Save geedelur/3208130 to your computer and use it in GitHub Desktop.
Cygwin + Ruby + RubyGems => Deploy with Capistrano from Windows

Deploy with Capistrano from Windows

Install Cygwin (http://www.cygwin.com/)

  • Select the folowing packages: curl, git, nano, openssh, openssl, ruby, unzip, util-linux, vim, wget

Download the RubyGems tarball from Ruby Forge (http://rubyforge.org/projects/rubygems/)

In a bash terminal, navigate to the unpacked directory and run:

  • ruby setup.rb install
  • gem update —system

Install Capistrano

  • gem install capistrano

And also could be useful

  • gem install capistrano-ext (for instace for Multistage Deploys)
  • gem install railsless-deploy
@tmsss
Copy link

tmsss commented Sep 11, 2013

It helped me a lot! Thank you sir

@jklovanc
Copy link

jklovanc commented Dec 3, 2013

This does not work for me because the only available ruby is 1.9 and it breaks my ruby 1.8 scripts.

@ReyFuertes
Copy link

doesnt work

@thomascrepain
Copy link

Still works, but you can find the RubyGems tarball at https://rubygems.org/pages/download now.

@cuchitto
Copy link

googleando llegué a esto, después me di cuenta que era tuyo :P

@geedelur
Copy link
Author

Now I use Git Bash + ConEmu + RubyInstaller + DevKit + Capistrano 3... far better!

@tuanquynh0508
Copy link

Thanks so much! Save my time.

@romdim
Copy link

romdim commented Mar 10, 2016

Latest version and url for rubygems:

wget https://rubygems.org/rubygems/rubygems-2.6.1.zip
unzip rubygems-2.6.1.zip
cd rubygems-2.6.1/
ruby setup.rb install
gem update —system
gem install capistrano
gem install capistrano-ext
gem install railsless-deploy

Thank you very much!

@saba83rish
Copy link

Perfect!!

@PhillipHuynh
Copy link

Peeps, I'm stuck where it cannot find the cap command. Any help is much appreciated!

@superoddy
Copy link

superoddy commented Feb 24, 2017

PhillipHuynh:

Add the following line to ~/.bashrc (windows path "C:\cygwin\home\<USER>\.bashrc"):
PATH=$PATH:~/bin

Then run
source ~/.bashrc

Also, you might have to modify the following file:
~/.gem/ruby/gems/net-ssh-4.1.0/lib/net/ssh/authentication/pageant.rb
(windows path "C:\cygwin\home\<USER>\.gem\ruby\gems\net-ssh-4.1.0\lib\net\ssh\authentication\pageant.rb")

Replace all 'user32', 'kernel32' og 'advapi32' with 'user32.dll', 'kernel32.dll' og 'advapi32.dll' (line 46, 47, 48, 53 and 59).

@PhillipHuynh
Copy link

@superoddy Thanks this worked!

@feryardiant
Copy link

Replace all 'user32', 'kernel32' og 'advapi32' with 'user32.dll', 'kernel32.dll' og 'advapi32.dll' (line 46, 47, 48, 53 and 59).

@superoddy, you safe my day bro, thank you.

@juliorosseti
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment