Forum: Ruby on Rails extconf.rb failed error during $bundle install

Cc7107cb48ea5e9d6b096f4c7fdf2bb1?d=identicon&s=25 Selvag Ruby (selvag1005)
on 2014-08-22 07:58
Hi expects,
Please give a solution to this problem. I use Ubuntu.

I've shown the error like "Make sure that `gem install <gem_name> -v
'x.x.x'` succeeds before bundling." in Windows7 too.

selvag@selvag:~/webapp$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 10.3.2
Installing i18n 0.6.1
Using multi_json 1.10.1
Installing activesupport 3.2.13
Installing builder 3.0.4
Installing activemodel 3.2.13
Using erubis 2.7.0
Installing journey 1.0.4
Installing rack 1.4.5
Installing rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Installing sprockets 2.2.2
Installing actionpack 3.2.13
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Installing actionmailer 3.2.13
Installing arel 3.0.3
Using tzinfo 0.3.41
Installing activerecord 3.2.13
Installing activeresource 3.2.13
Installing addressable 2.3.6
Using json 1.8.1
Installing mini_portile 0.6.0
Installing nokogiri 1.6.3.1
Installing aws-sdk 1.51.0
Using bundler 1.6.2
Using coffee-script-source 1.7.1
Using execjs 2.2.1
Using coffee-script 2.3.0
Installing rack-ssl 1.3.4
Installing rdoc 3.12.2
Using thor 0.19.1
Installing railties 3.2.13
Installing coffee-rails 3.2.2
Installing cookiejar 0.3.2
Installing daemons 1.1.9

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/selvag/.rvm/rubies/ruby-2.0.0-p481/bin/ruby extconf.rb
checking for main() in -lIL... 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/selvag/.rvm/rubies/ruby-2.0.0-p481/bin/ruby
  --with-ILlib
  --without-ILlib

extconf failed, exit code 1

Gem files will remain installed in
/home/selvag/.rvm/gems/ruby-2.0.0-p481/gems/devil-0.1.9.5 for
inspection.
Results logged to
/home/selvag/.rvm/gems/ruby-2.0.0-p481/extensions/x86_64-linux/2.0.0/devil-0.1.9.5/gem_make.out
An error occurred while installing devil (0.1.9.5), and Bundler cannot
continue.
Make sure that `gem install devil -v '0.1.9.5'` succeeds before
bundling.
4c6bde00168d595053c09aac7e487f8e?d=identicon&s=25 Colin Law (Guest)
on 2014-08-22 09:42
(Received via mailing list)
On 22 August 2014 06:58, Selvag Ruby <lists@ruby-forum.com> wrote:
> Hi expects,
> Please give a solution to this problem. I use Ubuntu.
> ...
> Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
>
>     /home/selvag/.rvm/rubies/ruby-2.0.0-p481/bin/ruby extconf.rb
> checking for main() in -lIL... 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 are probably missing something that is required for building gems.
In a terminal run
sudo apt-get install build-essential bison openssl libreadline6
libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev
libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake
libtool

That is all one line.  See if that helps.

Colin
Cc7107cb48ea5e9d6b096f4c7fdf2bb1?d=identicon&s=25 Selvag Ruby (selvag1005)
on 2014-08-22 13:33
Colin Law wrote in post #1155692:
> On 22 August 2014 06:58, Selvag Ruby <lists@ruby-forum.com> wrote:
>> Hi expects,
>> Please give a solution to this problem. I use Ubuntu.
>> ...
>> Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
>>
>>     /home/selvag/.rvm/rubies/ruby-2.0.0-p481/bin/ruby extconf.rb
>> checking for main() in -lIL... 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 are probably missing something that is required for building gems.
> In a terminal run
> sudo apt-get install build-essential bison openssl libreadline6
> libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev
> libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake
> libtool
>
> That is all one line.  See if that helps.
>
> Colin

Hi Colin, I've ran that line successfully. Then I got this error by this
following command.

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

        /usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lIL... 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=/usr/bin/ruby1.9.1
  --with-ILlib
  --without-ILlib


Gem files will remain installed in
/var/lib/gems/1.9.1/gems/devil-0.1.9.5 for inspection.
Results logged to
/var/lib/gems/1.9.1/gems/devil-0.1.9.5/ext/devil/gem_make.out
4c6bde00168d595053c09aac7e487f8e?d=identicon&s=25 Colin Law (Guest)
on 2014-08-22 14:38
(Received via mailing list)
On 22 August 2014 12:33, Selvag Ruby <lists@ruby-forum.com> wrote:
>
> Hi Colin, I've ran that line successfully. Then I got this error by this
> following command.
>
> selvag@selvag:~$ sudo gem install devil
> Building native extensions.  This could take a while...
> ERROR:  Error installing devil:
>   ERROR: Failed to build gem native extension.

I see from https://rubygems.org/gems/devil that this has not been
updated since 2010 so whether it will work with later rails I don't
know.  However, I also see from https://github.com/banister/devil that
you need some other libdevil stuff installed.  Whether these are
available for Ubuntu I don't know.

Colin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.