Search code examples
ruby-on-railsrubycapistranobzip2

How to install bzip2 for Capistrano-db-tasks on Windows?


I had an error with installation of bzip2 on Windows 7 for capistrano-db-tasks. I tried gem bzip2, gem bzip2-ruby and gem bzip2-ruby-rb20.

How to install it properly?


Solution

  • 1) You need to install bzip2 libs. Download zipped libs from Bzip2 for Windows, Binaries. Unpack them to directory without spaces, say C:\GnuWin32\bzip2-1.0.5-bin. lib subdir should contain libbz2.a, libbz2.def, libbz2.dll.a. This path (C:\GnuWin32\bzip2-1.0.5-bin\lib) should be provided to --with-bz2-lib.

    2) The package bzip2-ruby seems to have a not-fixed error yet according to the author github.com/brianmario (version.h is absent). So you can install bzip2-ruby-rb20 as he suggests.

    gem install bzip2-ruby-rb20 -- --with-bz2-include="C:\GnuWin32\bzip2-1.0.5-bin\include" -- --with-bz2-lib="C:\GnuWin32\bzip2-1.0.5-bin\lib"
    


    Should be done. Now you can use commands as "cap db:pull".


    [Thx to this post]