kart-able
kart-able

Reputation: 106

Package configuration for libxml2 is not found

I was in a bundle install after adding in my Gemfile:

gem 'pg',  '0.20.0'
gem 'fog', '1.42'
gem 'rails_serve_static_assets'
gem 'rails_stdout_logging'

but Bundler cannot continue after an error while installling ovirt-engine-sdk (4.2.3). The log says:

find_executable: checking for xml2-config... -------------------- no --------------------
package configuration for libxml2 is not found

I'm on windows 10, completely lost with the instructions I've found here https://github.com/GNOME/libxml2/tree/master/win32

This library is needed for some reason, but not the 4 gems listed above. Anyhow I need it!

Here is my Gemfile:

    source 'https://rubygems.org'

    git_source(:github) do |repo_name|
      repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
      "https://github.com/#{repo_name}.git"
    end


    gem 'rails', '~> 5.1.5'
    gem 'puma', '~> 3.7'
    gem 'sass-rails', '~> 5.0'
    gem 'uglifier', '>= 1.3.0'
    gem 'coffee-rails', '~> 4.2'
    gem 'turbolinks', '~> 5'
    gem 'jbuilder', '~> 2.5'
    gem 'devise', '~> 4.4', '>= 4.4.1'
    gem 'activeadmin', '~> 1.2', '>= 1.2.1'
    gem 'inherited_resources'
    gem 'active_skin'
    gem 'paperclip', '~> 6.0.0'
    gem 'cancancan'


    group :development, :test do
      # Use sqlite3 as the database for Active Record
      gem 'sqlite3'
      # Call 'byebug' anywhere in the code to stop execution and get a debugger console
      gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
      # Adds support for Capybara system testing and selenium driver
      gem 'capybara', '~> 2.13'
      gem 'selenium-webdriver'
    end

    group :development do
      # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
      gem 'web-console', '>= 3.3.0'
    end

    group :production do
      gem 'pg',  '0.20.0'
      gem 'fog', '1.42'
      gem 'rails_serve_static_assets' # for Static Assets on Heroku 
      gem 'rails_stdout_logging' # needed with the above one
    end

    # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
    gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Upvotes: 2

Views: 2301

Answers (2)

ryan2johnson9
ryan2johnson9

Reputation: 724

I had the exact same problem on my fresh ubuntu 18.04, installing a rails project.

a similar issue was reported here

So the fix for me was

sudo apt-get install libxml2-dev

then I got a similar prob with libcurl and fixed it with

sudo apt-get install libcurl4-openssl-dev

then I had a prob with pg and fixed it

sudo apt-get install libpq-dev from here

Upvotes: 10

kart-able
kart-able

Reputation: 106

I've isolated the problem caused by this line in config/application.rb config.serve_static_assets = true added together with the gems for heroku in production.

Upvotes: 0

Related Questions