bbc / wraith

Wraith — A responsive screenshot comparison tool

Home Page:http://bbc-news.github.io/wraith/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation: Debian requires `ruby-dev` package

slefevre opened this issue · comments

I was attempting to install wraith on a recently-updated debian system. I was encountering this error:

$ sudo gem install wraith
Building native extensions.  This could take a while...
ERROR:  Error installing wraith:
        ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.1.0/gems/nokogiri-1.7.2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86-linux/2.1.0/nokogiri-1.7.2/gem_make.out

I looked at the pre-requisites for Ubuntu, and ran all of them. I was only missing libicu-dev.

However, I was not able to install the wraith gem until I installed ruby-dev:

$ sudo aptitude install ruby-dev
The following NEW packages will be installed:
  libgmp-dev{a} libgmpxx4ldbl{a} ruby-dev ruby2.1-dev{a}
0 packages upgraded, 4 newly installed, 0 to remove and 46 not upgraded.
Need to get 1,826 kB of archives. After unpacking 5,698 kB will be used.
Do you want to continue? [Y/n/?]
Get: 1 http://ftp.us.debian.org/debian/ jessie/main libgmpxx4ldbl i386 2:6.0.0+dfsg-6 [22.3 kB]
Get: 2 http://ftp.us.debian.org/debian/ jessie/main libgmp-dev i386 2:6.0.0+dfsg-6 [621 kB]
...

$ sudo gem install wraith
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.7.2
Fetching: robotex-1.0.0.gem (100%)
Successfully installed robotex-1.0.0
Fetching: anemone-0.7.2.gem (100%)
...

You might consider adding a Debian section to the pre-requisites and including ruby-dev in it.

Can confirm this for Ubuntu 17.04. ruby-dev package is necessary to install wraith.

I was seeing a similar error

$ sudo gem install wraith
Building native extensions.  This could take a while...
ERROR:  Error installing wraith:
    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.4.0/gems/nokogiri-1.8.1/ext/nokogiri
/usr/bin/ruby2.4 -r ./siteconf20171120-10224-dwnbwh.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.4.0/gems/nokogiri-1.8.1 for inspection.
Results logged to /var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/nokogiri-1.8.1/gem_make.out
$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:    trusty
$ ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux-gnu]
$ convert -version
Version: ImageMagick 6.7.7-10 2017-07-31 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

I had followed the second answer here to update ruby https://stackoverflow.com/questions/26595620/how-to-install-ruby-2-1-4-on-ubuntu-14-04, i.e.

$ sudo apt-add-repository ppa:brightbox/ruby-ng
$ sudo apt-get update
$ sudo apt-get install ruby2.4

however, ruby-dev was still 1.9 so
$ sudo apt-get install ruby2.4-dev

did the trick for me.