Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ruby 2.3.0 on Cygwin x64

Installing Ruby 2.3.0 on Cygwin x64


You won't get a fully-functional installation! At the time of writing, it turned out gem is kind of broken on Ruby 2.3.0. Ruby gem installation fails with an error like kernel_require.rb:54:in require': cannot load such file -- win32/resolv`.



Install essential packages

The following packages should be installed with apt-cyg:

  • git
  • gcc-core
  • gcc-g++
  • make
  • zlib-devel
  • curl
  • autoconf
  • libiconv
  • libiconv-devel
  • rsync
  • patch
  • unzip
  • openssh
  • openssl-devel
  • libxml2-devel
  • libxslt-devel
  • libffi-devel
  • libgdbm-devel
  • libreadline-devel

Install rbenv

Install rbenv and ruby-build as usual.

Build Ruby 2.3.0

$ rbenv install 2.3.0
$ rbenv global 2.3.0
$ rbenv rehash

To check, run ruby -v. You will get something like that:

ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-cygwin]
Copy link

panyamin commented Feb 6, 2016


I writed a litte patch in order to resolv the issue on 'win32/resolv' error :

Copy link

panyamin commented Feb 20, 2016

Copy link

ramizudd commented Mar 30, 2017

Had to do following to make it work:

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv
$ echo 'eval "$(rbenv init -)"' >> ~/.zshenv
$ echo 'source $HOME/.zshenv' >> ~/.zshrc
$ exec $SHELL

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