I'm attempting to follow this tutorial here in cloud9. After entering $rails new myproject I get an error when attempting to $bundle install. part of the error reads
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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.
Make sure that `gem install nokogiri -v '1.6.8.1'` succeeds before bundling.
Tried installing using $ gem install nokogiri -v 1.6.8.1 but get extconf failed, exit code 1
Is there a way to install nokogirir in order for $bundle install to succeed? Also, how can I open the mkmf.log file in cloud9 IDE? I tried c9 mkmf.log but it didn't work.
Related
Everytime I try to install bundle I receive this error and I dont know what to do, I just update rails to 3.2.0. Im already on Ubuntu and my sqlite3 version is 3.37.2
I have tryed to uninstall sqlite3 and gem sqlite3-rails and then reinstall them, but nothing has change.
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /home/computer/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/sqlite3-1.5.4/ext/sqlite3
/home/computer/.rbenv/versions/3.2.0/bin/ruby -I /home/computer/.rbenv/versions/3.2.0/lib/ruby/3.2.0 extconf.rb
Building sqlite3-ruby using packaged sqlite3.
Extracting sqlite-autoconf-3400000.tar.gz into tmp/x86_64-linux-gnu/ports/sqlite3/3.40.0... OK
Running 'configure' for sqlite3 3.40.0... OK
Running 'compile' for sqlite3 3.40.0... OK
Running 'install' for sqlite3 3.40.0... OK
Activating sqlite3 3.40.0 (from /home/computer/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0)...
Could not configure the build properly (pkg_config). Please install either the `pkg-config` utility or the `pkg-config` rubygem.
*** 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.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/computer/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/sqlite3-1.5.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/computer/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/sqlite3-1.5.4 for inspection.
Results logged to /home/computer/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/sqlite3-1.5.4/gem_make.out```
I solved it installing pkg-config and then bundle install worked correctly
sudo apt-get update -y
sudo apt-get install -y pkg-config
bundle isntall
I am trying to install charlock_holmes gem on centos but i keep on getting
Installing charlock_holmes 0.7.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/rvm/gems/ruby-2.2.5/gems/charlock_holmes-
0.7.6/ext/charlock_holmes
/usr/local/rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20180607-1811-
1cbsady.rb
extconf.rb --with-icu-dir=C:UsersmadprogDesktopicusourcesdistusrlocal
--with-icui18nlib=icuin --with-icudatalib=icudt
checking for main() in -licuin... no
which: no brew in
(/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-
2.2.5#global/bin:/usr/local/rvm/rubies/ruby-
2.2.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/
rvm/bin:/root/bin)
checking for main() in -licuin... no
***** icu required (brew install icu4c or apt-get install libicu-dev)
*** 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.
To see why this extension failed to compile, please check the mkmf.log which
can be found here:
/usr/local/rvm/gems/ruby-2.2.5/extensions/x86_64-
linux/2.2.0/charlock_holmes-0.7.6/mkmf.log
extconf failed, exit code 1
An error occurred while installing charlock_holmes (0.7.6), and Bundler
cannot continue.
In Gemfile:
copyright-header was resolved to 1.0.22, which depends on
github-linguist was resolved to 6.2.0, which depends on
charlock_holmes
i also tried installing libicu-dev and this is what i get
no package libicu-dev available.
Error : nothing to do
please help, thank you.
Why is it so hard to get Ruby on Rails to work on a Mac? On Windows it is so easy but on my Mac, which I am now forced to use, it just doesn't want to play ball!
I cd into the project directory and run:
rails server
The the Terminal says:
You have requested:
sqlite3 >= 0
The bundle currently has sqlite3 locked at 1.3.10.
Try running `bundle update sqlite3`
Run `bundle install` to install missing gems.
So I run bundle update sqlite3 but then get:
*** 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.
...
An error occurred while installing debugger (1.6.8), and Bundler cannot
continue.
Make sure that `gem install debugger -v '1.6.8'` succeeds before bundling.
I then run gem install debugger -v '1.6.8'
Building native extensions. This could take a while...
ERROR: Error installing debugger:
ERROR: Failed to build gem native extension.
/Users/me/.rbenv/versions/2.1.5/bin/ruby extconf.rb
*** 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.
You didn't share the logs, but I suggest you to check/install Xcode command line tools, which you can do with:
xcode-select --install
Or by opening Xcode and installing them using GUI.
I am trying to install ruby but everytime sudo bundle --without production the installation crash when it comes to therubyracer:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lobjc... yes
*** 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.
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/therubyracer-0.9.10 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/therubyracer-0.9.10/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.9.10), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.9.10'` succeeds before bundling.
Is there any way to make this work?
Thanks
I tried running bundle and I got this strange error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/me/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for ruby/util.h... *** 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.
I checked the mkmf.log file, and found the error message.
$ cat /Users/me/.rvm/gems/ruby-2.0.0-p247#centralize/gems/bcrypt-ruby-3.1.2/ext/mri/mkmf.log
...
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo
...
I just recently updated XCode. So I opened up XCode and sure enough, I had to agree to the terms of use, and allow the installation to run. bundle runs perfectly, done!