Bundler won't install libxml-ruby (2.2.2) Rails - ruby-on-rails

I'm trying to get set up with a somewhat outdated Rails app so I can try and update it a little but I can't seem to get bundle install working. It keeps telling me:
An error occurred while installing libxml-ruby (2.2.2), and Bundler cannot continue.
Make sure that `gem install libxml-ruby -v '2.2.2'` succeeds before bundling.
The entire error is:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/camillavk/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150122-7039-3vyx6p.rb extconf.rb
extconf.rb:17:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:17:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... yes
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... no
checking for libiconv_open() in -liconv... no
checking for libiconv_open() in -llibiconv... no
checking for iconv_open() in -llibiconv... no
checking for iconv_open() in -lc... yes
checking for xmlParseDoc() in -lxml2... yes
checking for libxml/xmlversion.h... no
checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
creating extconf.h
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling ruby_xml_html_parser_options.c
compiling ruby_xml_cbg.c
compiling ruby_xml_html_parser.c
compiling ruby_xml_relaxng.c
compiling ruby_xml_schema.c
compiling ruby_xml_xpath_expression.c
compiling ruby_xml_parser.c
compiling ruby_xml_io.c
compiling ruby_xml_error.c
compiling ruby_xml_html_parser_context.c
ruby_xml_html_parser_context.c: In function ‘rxml_html_parser_context_options_set’:
ruby_xml_html_parser_context.c:307:7: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
int result;
^
compiling ruby_xml_node.c
ruby_xml_node.c: In function ‘rxml_node_to_s’:
ruby_xml_node.c:585:54: error: dereferencing pointer to incomplete type
result = rxml_new_cstr((const char*) output->conv->content, xencoding);
^
ruby_xml_node.c:587:56: error: dereferencing pointer to incomplete type
result = rxml_new_cstr((const char*) output->buffer->content, xencoding);
^
make: *** [ruby_xml_node.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/camillavk/.rvm/gems/ruby-2.1.5/gems/libxml-ruby-2.2.2 for inspection.
Results logged to /home/camillavk/.rvm/gems/ruby-2.1.5/extensions/x86_64-linux/2.1.0/libxml-ruby-2.2.2/gem_make.out
An error occurred while installing libxml-ruby (2.2.2), and Bundler cannot continue.
Make sure that `gem install libxml-ruby -v '2.2.2'` succeeds before bundling.
When I try and install libxml-ruby it says;
gem install libxml-ruby *[master][ruby-2.1.5]
Building native extensions. This could take a while...
Successfully installed libxml-ruby-2.8.0
1 gem installed
but the same error occurs again when I use bundle install...
When I try
gem install libxml-ruby -v '2.2.2'
I get this error:
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
/home/camillavk/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150122-7254-1rcd0x0.rb extconf.rb
extconf.rb:17:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:17:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... yes
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... no
checking for libiconv_open() in -liconv... no
checking for libiconv_open() in -llibiconv... no
checking for iconv_open() in -llibiconv... no
checking for iconv_open() in -lc... yes
checking for xmlParseDoc() in -lxml2... yes
checking for libxml/xmlversion.h... no
checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
creating extconf.h
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling ruby_xml_html_parser_options.c
compiling ruby_xml_cbg.c
compiling ruby_xml_html_parser.c
compiling ruby_xml_relaxng.c
compiling ruby_xml_schema.c
compiling ruby_xml_xpath_expression.c
compiling ruby_xml_parser.c
compiling ruby_xml_io.c
compiling ruby_xml_error.c
compiling ruby_xml_html_parser_context.c
ruby_xml_html_parser_context.c: In function ‘rxml_html_parser_context_options_set’:
ruby_xml_html_parser_context.c:307:7: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
int result;
^
compiling ruby_xml_node.c
ruby_xml_node.c: In function ‘rxml_node_to_s’:
ruby_xml_node.c:585:54: error: dereferencing pointer to incomplete type
result = rxml_new_cstr((const char*) output->conv->content, xencoding);
^
ruby_xml_node.c:587:56: error: dereferencing pointer to incomplete type
result = rxml_new_cstr((const char*) output->buffer->content, xencoding);
^
make: *** [ruby_xml_node.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/camillavk/.rvm/gems/ruby-2.1.5/gems/libxml-ruby-2.2.2 for inspection.
Results logged to /home/camillavk/.rvm/gems/ruby-2.1.5/extensions/x86_64-linux/2.1.0/libxml-ruby-2.2.2/gem_make.out
I'm running this on linux -> does anyone have any idea how I can get around this or fix it?
Thanks

Related

Trouble with SSL certificat and eventmachine gem

Helle everyone,
I am trying to install the eventmachine gem in a project after it fails during a bundle install.
gem install eventmachine -v '1.0.5'
Logs:
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/Users/studiohb/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... no
checking for gethrtime()... no
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
./project.h:116:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^
1 error generated.
make: *** [binder.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/studiohb/.rvm/gems/ruby-2.1.2#regiex/gems/eventmachine-1.0.5 for inspection.
Results logged to /Users/studiohb/.rvm/gems/ruby-2.1.2#regiex/extensions/x86_64-darwin-13/2.1.0-static/eventmachine-1.0.5/gem_make.out
So I believe that this is a SSL certificat issue si I tried :
brew link --force openssl
logs :
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
Do you guys have any ideas on going around this error ?

Bundle Install will not update eventmachine gem

I am trying to clone a repository from Github and I am on the step where I run "bundle install". However everytime I try to run this I get the following message:
An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.
When I run "gem install eventmachine -v '1.0.3'" I get
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/Users/christinating/.rbenv/versions/2.1.5/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
In file included from ./project.h:29:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:216:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:439:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
^
1 error generated.
make: *** [binder.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.3 for inspection.
Results logged to /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/eventmachine-1.0.3/gem_make.out
I have tried a number of solutions (that have not worked) that I found online:
I've changed my ruby version to 2.1.5 in my .ruby-version file and gemfile.
I have also changed the eventmachine version in my gemfile.lock and gemfile to 1.0.4 and then also 1.0.7. After each change I then tried to run bundle install or gem install eventmachine. Which just produced the following:
Fetching: eventmachine-1.0.7.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/Users/christinating/.rbenv/versions/2.1.5/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... no
checking for gethrtime()... no
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
In file included from ./project.h:29:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:216:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:439:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
^
1 error generated.
make: *** [binder.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.7 for inspection.
Results logged to /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/eventmachine-1.0.7/gem_make.out
Christinas-iMac:scholarhood christinating$ gem install eventmachine
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/Users/christinating/.rbenv/versions/2.1.5/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... no
checking for gethrtime()... no
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling binder.cpp
In file included from binder.cpp:20:
In file included from ./project.h:29:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:38:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:216:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:439:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
^
1 error generated.
make: *** [binder.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.7 for inspection.
Results logged to /Users/christinating/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/eventmachine-1.0.7/gem_make.out
I'm really out of ideas and really need some help please!!!
What happened was that I didn't have xcode installed! once I downloaded I was able to run bundle install and update eventmachine

Ruby gem eventmachine unable to install [duplicate]

This question already has answers here:
Eventmachine gem install fail
(9 answers)
Closed 8 years ago.
A package containing a bundle of a lot of technologies was delivered to me. When i try install the bundle using bundle install --local there is an error displayed that the eventmachine was not installed properly and suggests that the gem install eventmachine -v '1.0.3' should be run. When i do that the folloing message is shown:
$ gem install eventmachine
Fetching: eventmachine-1.0.3.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error
installing eventmachine:
ERROR: Failed to build gem native extension.
c:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for main() in -lssl... no
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... no
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
creating Makefile
make "DESTDIR="
generating rubyeventmachine-x64-mingw32.def
compiling binder.cpp
In file included from c:\ruby200-x64\devkit\mingw\bin\../lib/gcc/x86_64-w64-ming
w32/4.7.2/../../../../x86_64-w64-mingw32/include/process.h:12:0,
from c:/Ruby200-x64/include/ruby-2.0.0/ruby/win32.h:60,
from c:/Ruby200-x64/include/ruby-2.0.0/ruby/defines.h:153,
from c:/Ruby200-x64/include/ruby-2.0.0/ruby/ruby.h:70,
from c:/Ruby200-x64/include/ruby-2.0.0/ruby.h:33,
from em.h:24,
from project.h:150,
from binder.cpp:20:
c:\ruby200-x64\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../
x86_64-w64-mingw32/include/sys/types.h:68:16: error: conflicting declaration 'ty
pedef _pid_t pid_t'
In file included from binder.cpp:20:0:
project.h:97:13: error: 'pid_t' has a previous declaration as 'typedef int pid_t
'
In file included from project.h:151:0,
from binder.cpp:20:
ed.h: In member function 'void EventableDescriptor::SetSocketInvalid()':
ed.h:43:40: warning: overflow in implicit constant conversion [-Woverflow]
make: *** [binder.o] Error 1
Gem files will remain installed in c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/event
machine-1.0.3 for inspection.
Results logged to c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/ext
/gem_make.out
Inside the gem_make.out the following text is shown:
c:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for main() in -lssl... no
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... no
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
creating Makefile
make "DESTDIR="
generating rubyeventmachine-x64-mingw32.def
compiling binder.cpp
In file included from c:\ruby200-x64\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/process.h:12:0,
from c:/Ruby200-x64/include/ruby-2.0.0/ruby/win32.h:60,
from c:/Ruby200-x64/include/ruby-2.0.0/ruby/defines.h:153,
from c:/Ruby200-x64/include/ruby-2.0.0/ruby/ruby.h:70,
from c:/Ruby200-x64/include/ruby-2.0.0/ruby.h:33,
from em.h:24,
from project.h:150,
from binder.cpp:20:
c:\ruby200-x64\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/sys/types.h:68:16: error: conflicting declaration 'typedef _pid_t pid_t'
In file included from binder.cpp:20:0:
project.h:97:13: error: 'pid_t' has a previous declaration as 'typedef int pid_t'
In file included from project.h:151:0,
from binder.cpp:20:
ed.h: In member function 'void EventableDescriptor::SetSocketInvalid()':
ed.h:43:40: warning: overflow in implicit constant conversion [-Woverflow]
make: *** [binder.o] Error 1
Anyone got a clue of what this might be?
I have installed ruby 2.0.0 with DevKit. Both in the 64 bit version.
The problem was solved with help from the thread that #GraemeMcLean mentions in the comments above ( Eventmachine gem install fail )
This was a weird workaround though, and the authors of the gem should really fix this.

Error installing Nokogiri when using "bundle install"

When I run bundle install it stops with:
Installing nokogiri (1.4.3.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
I tried installing it manually using "Installing Nokogiri" but this did work out in my favour.
Do I need to change something?
/usr/bin/ruby1.9.1 extconf.rb'
extconf.rb:10: Use RbConfig instead of obsolete and deprecated Config.
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
Or this:
make
compiling xml_dtd.c
compiling xml_entity_reference.c
compiling xml_sax_parser_context.c
compiling xml_attribute_decl.c
compiling xml_schema.c
compiling xml_processing_instruction.c
compiling xml_cdata.c
compiling xml_xpath_context.c
xml_xpath_context.c: In function ‘xpath_generic_exception_handler’:
xml_xpath_context.c:154:3: error: format not a string literal and no format arguments [- Werror=format-security]
cc1: some warnings being treated as errors
make: *** [xml_xpath_context.o] Error 1
Gem files will remain installed in /home/virinchy/.bundler/tmp/10048/gems/nokogiri- 1.4.3.1 for inspection.
Results logged to /home/virinchy/.bundler/tmp/10048/gems/nokogiri- 1.4.3.1/ext/nokogiri/gem_make.out
An error occured while installing nokogiri (1.4.3.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.4.3.1'` succeeds before bundling.'
First, Nokogiri 1.4.3.1 is almost three years old. You should upgrade.
Second, please see https://github.com/sparklemotion/nokogiri/issues/680 for details around how Debian hardened the gcc compiler. You will need to use either an older version of debian or a newer version of Nokogiri.

Installing nokogiri - Failed to build gem native extension

While installing Nokogiri on Ubuntu 12, I got an error:
Installing nokogiri (1.4.4) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:10: Use RbConfig instead of obsolete and deprecated Config.
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
make
compiling html_sax_parser_context.c
compiling xml_io.c
compiling xml_entity_reference.c
compiling xml_schema.c
compiling xml_element_content.c
compiling xml_reader.c
compiling xml_sax_push_parser.c
compiling xml_sax_parser.c
compiling xslt_stylesheet.c
compiling xml_element_decl.c
compiling xml_node.c
compiling xml_cdata.c
compiling xml_processing_instruction.c
compiling xml_entity_decl.c
compiling xml_attribute_decl.c
compiling xml_xpath_context.c
xml_xpath_context.c: In function ‘xpath_generic_exception_handler’:
xml_xpath_context.c:184:3: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors
make: *** [xml_xpath_context.o] Error 1
Gem files will remain installed in /home/alex/.bundler/tmp/22194/gems/nokogiri-1.4.4 for inspection.
Results logged to /home/alex/.bundler/tmp/22194/gems/nokogiri-1.4.4/ext/nokogiri/gem_make.out
An error occurred while installing nokogiri (1.4.4), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.4.4'` succeeds before bundling.
I already installed libxslt-dev and libxml2-dev, but as you see, it didn't help.
How do I solve it?
I stumbled at this trying to install bigbluebutton on ubuntu 13.04
I solved it doing this trick to compile reverting the -Wformat-security gcc flag systemwide
Be careful doing the first rm. It can break your whole system!!
rm /usr/bin/gcc
nano /usr/bin/gcc
## contents of /usr/bin/gcc
#!/bin/sh
gcc-4.7 $* -Wno-format-security
## save and exit
chmod u+x /usr/bin/gcc
gem install nokogiri -v '1.4.4'
Is there a specific reason you need 1.4.4 instead of the latest 1.5.6? Otherwise I suggest upgrading.
The Nokogiri changelog shows they fixed this in 1.5.4:
Build support on hardened Debian systems that use
-Werror=format-security. #680.
#Confusion has the right idea.
Bundler is probably locked to nokogiri-1.4.4 in the Gemfile and/or Gemfile.lock. #Confusion's answer of running bundle update should allow your Ruby Bundler environment to use the successfully installed nokogiri-1.5.6.

Resources