While bundle install the error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/launchpad/.rbenv/versions/1.9.3-p448/bin/ruby extconf.rb
Can't handle 1.9.x yet
* 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/launchpad/.rbenv/versions/1.9.3-p448/bin/ruby
Gem files will remain installed in /home/launchpad/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/linecache-0.46 for inspection.
Results logged to /home/launchpad/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/linecache-0.46/ext/gem_make.out
An error occurred while installing linecache (0.46), and Bundler cannot continue.
Make sure that gem install linecache -v '0.46' succeeds before bundling.
You are seeing the error "Can't handle 1.9.x yet" because the linecache gem is not compatible with Ruby 1.9.x. It looks like you are using Ruby 1.9.3-p44.
There is another gem called linecache19 that you can try that is compatible with 1.9.x.
Alternatively, you can:
Use an older version of Ruby via rbenv
Eliminate whatever gem you are trying to use that requires this gem (e.g. ruby-debug)
For more information, look at this question
Related
I am getting the following error while trying to install ffi-yajl
Using berkshelf 4.3.3
Installing ffi-yajl 2.4.0 with native extensions
STDERR: Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/var/lib/gems/2.5.0/gems/ffi-yajl-2.4.0/ext/ffi_yajl/ext/encoder
/usr/bin/ruby2.5 -r ./siteconf20210628-15489-1ggpxn5.rb 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.
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/$(RUBY_BASE_NAME)2.5
extconf.rb:9:in <main>': undefined method include_path' for Libyajl2:Module
(NoMethodError)
Did you mean? include
extconf failed, exit code 1
It seems to be this line that is failing:
https://github.com/chef/ffi-yajl/blob/master/ext/ffi_yajl/ext/encoder/extconf.rb#L9
unfortunately my knowledge of Ruby is very limited and I don't know if 'include_path' should be defined and if it should then why it is not defined.
Thanks
This should help you.
Here are the steps:
sudo apt remove ruby
Install ruby https://tecadmin.net/install-ruby-latest-stable-centos/#
try gem install again
Source: https://github.com/chef/ffi-yajl/issues/91
I am trying to install linecache with RVM on Ruby 2.1.1.
$ ruby --version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
I run bundle install
$ bundle install
It blows saying it isn't compatible with 1.9.x when I run bundle install:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/g/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
Can't handle 1.9.x yet
*** 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/g/.rvm/rubies/ruby-2.1.2/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in /home/g/.rvm/gems/ruby-2.1.2/gems/linecache-0.46
for inspection.
Results logged to /home/g/.rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0
/linecache-0.46/gem_make.out
An error occurred while installing linecache (0.46), and Bundler cannot continue.
Make sure that `gem install linecache -v '0.46'` succeeds before bundling.
Any ideas whats happening here?
Linecache hasn't been updated in 3 years, the last update was bringing it up to version 1.9.3. Unless you're pulling it from someone else's fork, since you're using 2.1.1 the gem won't work. Most likely the error message hasn't been updated so it just tells you it's invalid for 1.9.x since it doesn't know about any newer versions.
Am trying to install memcached gem in my windows 8.Am getting following error while executing the command gem install memcached
I already installed Devkit and using ruby1.9.3
C:\Users\aran>gem install memcached
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while.
..
ERROR: Error installing memcached:
ERROR: Failed to build gem native extension.
C:/ProgramData/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for sasl/sasl.h... no
Please install SASL to continue. The package is called libsasl2-dev on Ubuntu an
d cyrus-sasl on Gentoo.
*** 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=C:/ProgramData/RailsInstaller/Ruby1.9.3/bin/ruby
Gem files will remain installed in C:/ProgramData/RailsInstaller/Ruby1.9.3/lib/r
uby/gems/1.9.1/gems/memcached-1.6.1 for inspection.
Results logged to C:/ProgramData/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/ge
ms/memcached-1.6.1/ext/gem_make.out
How can i rectify this error??
On Fedora, I installed cyrus-sasl-devel. There might be same or something equivalent on Windows too...give it a try..
I would like to create a chatbot, and for that I want to use Link Parser, which is basically an engine that finds out the relations between words when looking at a sentence.
There is a Ruby wrapper which I tried to install by using:
gem install linkparser
and also:
gem install linkparser -- --with-link-grammar="C:\Users\Gebruiker\Downloads\Linkparsergrammar\linkgrammar4r-0.0.3"
However, I keep getting the following errors:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing linkparser:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb --with-link-grammar=C:\Users\Gebruiker\Downloads\Linkparsergrammar\linkgrammar4r-0.0.3
checking for pkg-config... no
Couldn't find your pkg-config binary
*** 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=C:/Ruby193/bin/ruby
--with-link-grammar
--with-pkg-config
--without-pkg-config
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/linkparser-1.1.3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/linkparser-1.1.3/ext/gem_make.out
I am on Windows Vista 32bit, and using the newest Ruby (1.9.3-p125)
Can somebody explain what's going on?
Does this help with your problem? problems on installing link-parser gem on snow leopard
I know it's for mac but it sounds similar
rails version 2.3.5
ruby version 1.8.7
PS C:\Ruby187\apps\redmine> gem install mysql
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
C:/Ruby187/bin/ruby.exe extconf.rb
checking for main() in -llibmysql... 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=C:/Ruby187/bin/ruby
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-libmysqllib
--without-libmysqllib
Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
There is already a pre-built binary of mysql 2.8.1 gem on rubygems.org:
https://rubygems.org/gems/mysql/versions/2.8.1-x86-mingw32
Unless you're forcing --platform=ruby in which case you need MySQL headers and linking libraries.
You also need RubyInstaller DevKit, if that is the Ruby version you're trying to use.
See this post in our group here