Gem::Ext::BuildError: ERROR: Failed to build gem native extension. on CenOS 6.5
Ruby 2.4 is very new. In fact, it was released only 3 days ago.
Since there are several impirtant internal changes in Ruby 2.4, it is quite likely that many gems (and Redmine itself) are not yet compatible with this version of Ruby.
From your error message, it does indeed seem that the JSON gem needs to be adapted in order to handle some changes in Ruby 2.4 regarding whole numbers.
You should use an older version of Ruby for now, e.g. Ruby 2.3.3. As you can see on http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Ruby-interpreter, Redmine requires specific Ruby versions depending on the version of Redmine.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. - CentOS 6.5
checking for libpq-fe.h... no
You need the Postgresql development libraries.
Try:
yum install postgresql-devel
or whatever is specific to your OS.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension trying to install postgresql
Because you're using the yum
package manager, the package name is wrong. libpq-dev
is the package name for the apt
package manager. Try installing postgresql-libs
. If that doesn't work, try postgresql-devel
.
bcrypt-ruby 3.1.2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension in OSX
When upgrading to Ruby 2.1.x in OS X El Capitan:
For some of the native extensions to build you need to make sure that the coreutils package is installed.
To do this run:
brew install coreutils
This could also cause similar failures for raindrops, pg, kgio, http_parser, fast-stemmer, unf_ext, ffi, debug-inspector, and nokogiri
Gem::Ext::BuildError: ERROR: Failed to build gem native extension for Puma Gem
You need homebrew and openssl. Run brew install openssl
and thenbundle config build.puma --with-opt-dir=/usr/local/opt/openssl
Then running bundle install
should work.
Relevant issue: https://github.com/puma/puma/issues/718
Error in installing json 1.8.3 with ruby 2.4.0 on Ubuntu
I think you can solve your problem as:
sudo apt-get install libgmp3-dev
and if above command didn't solve your system, you can try to install this command:
sudo apt-get install libgmp-dev
You can refer at json-1.8.3 Gem::Ext::BuildError
Because your ruby version is 2.4.0
.The ruby version is not compatible with json 1.8.3
. You can try add this line in your Gemfile:
gem 'json', github: 'flori/json', branch: 'v1.8'
Related Topics
How to Reduce the Quality of an Uploading Image Using Paperclip
How to Fix in Ruby on Rails the Undefined Method 'Alias_Method_Chain' Error
Bundle Install Is Using a Different Ruby Version
Error While Installing Iconv on Windows by Ruby2.0.0
Error: Null Value in Column "Id" Violates Not-Null Constraint
Solr or Sphinx? Which Is Better
Ruby Sequel: Array Returned by Query Is Being Returned as a String Object, Not an Array Object
Rails Cannot Find Model with Same Name as Ruby Class
How to Serialize as Activesupport::Hashwithindifferentaccess Anymore
Passing Variables on the Command Line to a Cucumber Test
Error When Starting Sinatra: "Tried to Create Proc Object Without a Block"
How to Combine Multiple Arrays of the Same Size in Ruby
Ruby's "Foo = True If !Defined? Foo" Won't Work as Expected
Disabling Irb Autocomplete on Heroku
Algorithm to Shuffle an Array Randomly Based on Different Weights
How to Fill Out Login Form with Mechanize in Ruby