Skip to content

Instantly share code, notes, and snippets.

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

Installing Ruby 2.3.0 on Cygwin x64

Warning!

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`.

Prerequisites

Installation

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]
@panyamin

This comment has been minimized.

Copy link

commented Feb 6, 2016

Hello,

I writed a litte patch in order to resolv the issue on 'win32/resolv' error : https://gist.github.com/panyamin/8d7c03cfbf8d558b1e3f

@panyamin

This comment has been minimized.

Copy link

commented Feb 20, 2016

@ramizudd

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.