Bundle Install ERROR: ERROR: Failed to build gem native extension

Hello,

I’m trying to setup postgreSQL onto rails on linux and when I type
bundle install this is the error that i get. I guess its not finding
the files

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

    /home/taka/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

checking for bzlib.h… no
checking for BZ2_bzWriteOpen() in -lbz2… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
–with-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/home/taka/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
–with-bz2-dir
–without-bz2-dir
–with-bz2-include
–without-bz2-include=${bz2-dir}/include
–with-bz2-lib
–without-bz2-lib=${bz2-dir}/lib
–with-bz2lib
–without-bz2lib
libbz2 not found, maybe try manually specifying --with-bz2-dir to find
it?

Gem files will remain installed in
/home/taka/.rvm/gems/ruby-1.9.3-p194/gems/bzip2-ruby-0.2.7 for
inspection.
Results logged to
/home/taka/.rvm/gems/ruby-1.9.3-p194/gems/bzip2-ruby-0.2.7/ext/gem_make.out
An error occurred while installing bzip2-ruby (0.2.7), and Bundler
cannot continue.
Make sure that gem install bzip2-ruby -v '0.2.7' succeeds before
bundling.

You need to install the BZ compression library, including it’s header
files,
usually in libbz2-dev or libbz2-devel.

HTH,
Jeffrey

Quoting Tak G. [email protected]:

Jeffrey L. Taylor wrote in post #1077565:

You need to install the BZ compression library, including it’s header
files,
usually in libbz2-dev or libbz2-devel.

HTH,
Jeffrey

Quoting Tak G. [email protected]:

worked great! thank you so much

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs