Skip to content

Instantly share code, notes, and snippets.

@vertiginous
Created January 10, 2011 15:27
Show Gist options
  • Save vertiginous/772895 to your computer and use it in GitHub Desktop.
Save vertiginous/772895 to your computer and use it in GitHub Desktop.
Installing oniguruma on windows with devkit.

NOTE: If you use ansicon make sure it is not loaded

Download the Oniguruma library.

I have had good luck with 5.9.1 and 5.9.2.

Extract it to a temporary folder.

I used C:\Users\gthiesfeld\Work\repo\onig-5.9.2.

Activate the devkit

C:\>\Ruby\DevKit\devkitvars.bat
Adding the DevKit to PATH...

build oniguruma

C:\Users\gthiesfeld\Work\repo\onig-5.9.2>sh configure
... output snipped ...

C:\Users\gthiesfeld\Work\repo\onig-5.9.2>make
... output snipped ...

Add the lib and headers to the GCC search paths

set CPATH=C:\Users\gthiesfeld\Work\repo\onig-5.9.2
set LIBRARY_PATH=C:\Users\gthiesfeld\Work\repo\onig-5.9.2\.libs

Install the oniguruma gem.

C:\>gem in oniguruma
Building native extensions.  This could take a while...
Successfully installed oniguruma-1.1.0
1 gem installed
Installing ri documentation for oniguruma-1.1.0...

No definition for oregexp_initialize
Installing RDoc documentation for oniguruma-1.1.0...

No definition for oregexp_initialize

That's it. The errors at the end are due to rdoc and ri not being able to parse the source. If you see these, don't be alarmed.

@s01ipsist
Copy link

Legend, lifesaver.

@archonwang
Copy link

Great help for me .

Thanks so much~~

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