Reputation: 11
I'm learning ruby on rails and have had my project hosted on c9.io. In the process of migrating over to Amazon AWS Cloud9 I'm having to reinstall my gems to my project. I am getting a config error while trying to build gem native extensions.
I'm not actually sure how to configure this gem before I enter 'gem install fog' into the command line. I've tried searching on the Fog website but I can't find the info on their page.
The error is:
Building native extensions. This could take a while...
ERROR: Error installing fog:
ERROR: Failed to build gem native extension.
current directory: /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/ovirt-engine-sdk-4.3.0/ext/ovirtsdk4c
/home/ubuntu/.rvm/rubies/ruby-2.3.4/bin/ruby -r ./siteconf20190515-17400-2yzzer.rb extconf.rb
checking for xml2-config... 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
--without-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/ubuntu/.rvm/rubies/ruby-2.3.4/bin/$(RUBY_BASE_NAME)
--with-libxml2-config
--without-libxml2-config
--with-pkg-config
--without-pkg-config
extconf.rb:29:in `<main>': The "libxml2" package isn't available. (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/ubuntu/.rvm/gems/ruby-2.3.4/extensions/x86_64-linux/2.3.0/ovirt-engine-sdk-4.3.0/mkmf.log
extconf failed, exit code 1
The mkmf.log says:
find_executable: checking for xml2-config... -------------------- no
--------------------
"pkg-config --exists libxml2"
package configuration for libxml2 is not found
I just don't know how to translate this log message into my codebase so I can install fog and continue working on my app.
Upvotes: 1
Views: 1389
Reputation: 557
Instead of
gem 'fog'
Use
gem 'fog-aws'
In your gem file and it should work.
Upvotes: 2
Reputation: 3984
Try installing xml2 development package:
apt-get install libxml2-dev
This should work! (You might need to re-install Ruby after that.)
Upvotes: 0