Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignoring gems because its extensions are not built [duplicate]

I installed the rails in my machine

ruby 2.3.1

rails 5.1.4

Ubuntu 16.04 os

After rails installation, When i check rails version rails -v It throws Ignoring "Some gems list" because its extensions are not built

Ignoring nokogiri-1.8.1 because its extensions are not built.  Try: gem pristine nokogiri --version 1.8.1
Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
Ignoring byebug-9.1.0 because its extensions are not built.  Try: gem pristine byebug --version 9.1.0
Ignoring curb-0.9.4 because its extensions are not built.  Try: gem pristine curb --version 0.9.4
Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.18 because its extensions are not built.  Try: gem pristine ffi --version 1.9.18
Ignoring gem-wrappers-1.3.2 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.2.7
Ignoring nio4r-2.2.0 because its extensions are not built.  Try: gem pristine nio4r --version 2.2.0
Ignoring pg-0.21.0 because its extensions are not built.  Try: gem pristine pg --version 0.21.0
Ignoring websocket-driver-0.6.5 because its extensions are not built.  Try: gem pristine websocket-driver --version 0.6.5
Rails 5.1.4

After new rails application created successfully When i run bundle install It throws errror message like:

An error occurred while installing json (1.8.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.6'` succeeds before bundling.
like image 392
Dhinakaran Avatar asked Jan 19 '18 11:01

Dhinakaran


People also ask

What is GEM pristine?

Meanwhile, gem pristine --all cleans all installed gems for that Ruby version. If a developer forgets which gems in their project they might have been debugging, the Rubygems gem pristine [GEMNAME] command may be inconvenient. One can avoid waiting for gem pristine --all , and instead run bundle pristine .

What is gem native extension?

A native extension is generally a C code that interacts with a non-Ruby dependency. For instance, a gem that uses ImageMagic have a native extension written in C that talks to ImageMagic and represents the bridge from the Ruby gem to ImageMagic.


1 Answers

I ran the command gem pristine --all to remove all errors

This error occurs when you switch the ruby version

like image 75
Dhinakaran Avatar answered Sep 21 '22 18:09

Dhinakaran