Gem ext builderror error failed to build gem native extension

Error details Gem::Ext::BuildError: ERROR: Failed to build gem native extension. Permission denied @ dir_s_mkdir - ./.gem.20150131-61502-djrp3 Gem files will remain installed in /Users/ratciti/.rbe...

I run «bundle install».

➜ dailsoncampos git:(Production) ✗ bundle install
Fetching gem metadata from https://rubygems.org/………..
Fetching version metadata from https://rubygems.org/…
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies…
Using rake 11.1.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using mime-types 2.99
Using arel 6.0.3
Using debug_inspector 0.0.2
Using bundler 1.11.2
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using thor 0.19.1
Using columnize 0.9.0
Using concurrent-ruby 1.0.1
Using debugger-linecache 1.2.0
Using debugger-ruby_core_source 1.3.8
Using multi_json 1.11.2
Using sass 3.4.22
Using tilt 2.0.2
Using spring 1.6.4
Using sqlite3 1.3.11
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using nokogiri 1.6.7.2
Using rack-test 0.6.3
Using mail 2.6.3
Using binding_of_caller 0.7.2
Using coffee-script 2.4.1
Using uglifier 2.7.2
Using sprockets 3.5.2
Installing debugger 1.6.8 with native extensions

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

/home/campos/.rvm/rubies/ruby-2.1.8/bin/ruby -r ./siteconf20160423-10896-9be59d.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=/home/campos/.rvm/rubies/ruby-2.1.8/bin/ruby
/home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:1401:in initialize': No such file or directory @ rb_sysopen - ./218/ruby_debug.h (Errno::ENOENT) from /home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:1401:inopen’
from /home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:1401:in copy_file' from /home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:483:incopy_file’
from /home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:400:in block in cp' from /home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:1579:inblock in fu_each_src_dest’
from /home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:1593:in fu_each_src_dest0' from /home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:1577:infu_each_src_dest’
from /home/campos/.rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/fileutils.rb:399:in cp' from extconf.rb:83:inblock in


from extconf.rb:82:in each' from extconf.rb:82:in

extconf failed, exit code 1

Gem files will remain installed in /home/campos/.rvm/gems/ruby-2.1.8/gems/debugger-1.6.8 for inspection.
Results logged to /home/campos/.rvm/gems/ruby-2.1.8/extensions/x86_64-linux/2.1.0/debugger-1.6.8/gem_make.out
Using sdoc 0.4.1
Using activesupport 4.2.5.1
Using loofah 2.0.3
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.

Introduction

This article will show how to solve the specific error in the title. The error appears as part of a process for installing metasploit framework. The installation itself is using the ‘bundle’ tool. It is because metasploit framework is written in Ruby. Below is the complete output showing the error message :

user@hostname:/opt/metasploit-framework$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Following files may not be writable, so sudo is needed:
  /usr/local/bin
  /var/lib/gems/2.5.0
  /var/lib/gems/2.5.0/build_info
  /var/lib/gems/2.5.0/cache
  /var/lib/gems/2.5.0/doc
  /var/lib/gems/2.5.0/extensions
  /var/lib/gems/2.5.0/gems
  /var/lib/gems/2.5.0/specifications
Fetching rake 12.3.2


Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password: 
Installing rake 12.3.2
Fetching Ascii85 1.0.3
Installing Ascii85 1.0.3
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching minitest 5.11.3
Installing minitest 5.11.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching activesupport 4.2.11
Installing activesupport 4.2.11
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubis 2.7.0
Installing erubis 2.7.0
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.1
Installing nokogiri 1.10.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /tmp/bundler20190215-6232-1yag4b9nokogiri-1.10.1/gems/nokogiri-1.10.1/ext/nokogiri
/usr/bin/ruby2.5 -r ./siteconf20190215-6232-tyetzx.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20190215-6232-1yag4b9nokogiri-1.10.1/gems/nokogiri-1.10.1 for inspection.
Results logged to /tmp/bundler20190215-6232-1yag4b9nokogiri-1.10.1/extensions/x86_64-linux/2.5.0/nokogiri-1.10.1/gem_make.out

An error occurred while installing nokogiri (1.10.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.10.1' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  factory_bot_rails was resolved to 5.0.1, which depends on
    railties was resolved to 4.2.11, which depends on
      actionpack was resolved to 4.2.11, which depends on
        actionview was resolved to 4.2.11, which depends on
          rails-dom-testing was resolved to 1.0.9, which depends on
            nokogiri
user@hostname:/opt/metasploit-framework$

The output above happens after solving the problem as in the full description in the article in this link.

Solution

The problem is a gem with the name of ‘nokogiri’, specifically with the version of ‘1.10.1’. The installation of the gem fails. So, in order to solve the problem as in the description in the previous section, just do the following steps :

1. First of all, install a new package which is the solution for the problem. The package name is ‘ruby-dev’. Type the following command to install that package :

user@hostname:/opt/metasploit-framework$ sudo apt-get -y install ruby-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cabextract fonts-wine gstreamer1.0-plugins-base:i386 gyp icoutils libasn1-8-heimdal:i386 libasound2:i386 libasound2-plugins:i386 libasyncns0:i386 libavahi-client3:i386 libavahi-common-data:i386
  libavahi-common3:i386 libbsd0:i386 libcairo2:i386 libcap2:i386 libcapi20-3 libcapi20-3:i386 libcdparanoia0:i386 libcups2:i386 libdbus-1-3:i386 libexif12:i386 libflac8:i386 libfontconfig1:i386
  libfreetype6:i386 libgd3:i386 libgl1:i386 libgl1-mesa-glx:i386 libglib2.0-0:i386 libglu1-mesa:i386 libglvnd0:i386 libglx-mesa0:i386 libglx0:i386 libgmp10:i386 libgnutls30:i386 libgphoto2-6:i386
  libgphoto2-port12:i386 libgsm1:i386 libgssapi-krb5-2:i386 libgssapi3-heimdal:i386 libgstreamer-plugins-base1.0-0:i386 libgstreamer1.0-0:i386 libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386
  libheimntlm0-heimdal:i386 libhogweed4:i386 libhx509-5-heimdal:i386 libidn2-0:i386 libieee1284-3:i386 libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjs-async libjs-inherits
  libjs-node-uuid libk5crypto3:i386 libkeyutils1:i386 libkrb5-26-heimdal:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms2-2:i386 libldap-2.4-2:i386 libllvm6.0:i386 libltdl7:i386 libmpg123-0:i386
  libmspack0 libnettle6:i386 libodbc1 libodbc1:i386 libogg0:i386 libopenal1:i386 libopus0:i386 liborc-0.4-0:i386 libosmesa6 libosmesa6:i386 libp11-kit0:i386 libpcap0.8:i386 libpixman-1-0:i386
  libpng16-16:i386 libpulse0:i386 libroken18-heimdal:i386 libsamplerate0:i386 libsane1:i386 libsasl2-2:i386 libsasl2-modules-db:i386 libsndfile1:i386 libsndio6.1:i386 libspeexdsp1:i386 libsqlite3-0:i386
  libssl1.1:i386 libtasn1-6:i386 libtheora0:i386 libtiff5:i386 libunistring2:i386 libusb-1.0-0:i386 libuv1-dev libv4l-0:i386 libv4lconvert0:i386 libvisual-0.4-0:i386 libvorbis0a:i386 libvorbisenc2:i386
  libwebp6:i386 libwind0-heimdal:i386 libwine libwine:i386 libwrap0:i386 libwxgtk3.0-gtk3-0v5 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386
  libxcb-present0:i386 libxcb-render0:i386 libxcb-shm0:i386 libxcb-sync1:i386 libxcb1:i386 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386
  libxinerama1:i386 libxml2:i386 libxpm4:i386 libxrandr2:i386 libxrender1:i386 libxshmfence1:i386 libxslt1.1:i386 libxxf86vm1:i386 node-abbrev node-ansi node-ansi-color-table node-archy node-async
  node-balanced-match node-block-stream node-brace-expansion node-builtin-modules node-combined-stream node-concat-map node-cookie-jar node-delayed-stream node-forever-agent node-form-data
  node-fs.realpath node-fstream node-fstream-ignore node-github-url-from-git node-glob node-graceful-fs node-hosted-git-info node-inflight node-inherits node-ini node-is-builtin-module node-isexe
  node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv
  node-path-is-absolute node-pseudomap node-qs node-read node-read-package-json node-request node-retry node-rimraf node-semver node-sha node-slide node-spdx-correct node-spdx-expression-parse
  node-spdx-license-ids node-tar node-tunnel-agent node-underscore node-validate-npm-package-license node-which node-wrappy node-yallist ocl-icd-libopencl1 ocl-icd-libopencl1:i386 pkg-php-tools
  python-wxgtk3.0 python-wxversion shtool wine-stable wine32:i386 wine64
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  ruby2.5-dev ruby2.5-doc
The following NEW packages will be installed:
  ruby-dev ruby2.5-dev ruby2.5-doc
0 upgraded, 3 newly installed, 0 to remove and 32 not upgraded.
Need to get 1.874 kB of archives.
After this operation, 18,6 MB of additional disk space will be used.
Get:1 http://xxx.xxxxxxxxxx.xxxxxx.xxx/ubuntu bionic-updates/main amd64 ruby2.5-dev amd64 2.5.1-1ubuntu1.1 [63,7 kB]
Get:2 http://xxx.xxxxxxxxxx.xxxxxx.xxx/ubuntu bionic/main amd64 ruby-dev amd64 1:2.5.1 [4.604 B]
Get:3 http://xxx.xxxxxxxxxx.xxxxxx.xxx/ubuntu bionic-updates/main amd64 ruby2.5-doc all 2.5.1-1ubuntu1.1 [1.806 kB]
Fetched 1.874 kB in 4s (469 kB/s)        
Selecting previously unselected package ruby2.5-dev:amd64.
(Reading database ... 338278 files and directories currently installed.)
Preparing to unpack .../ruby2.5-dev_2.5.1-1ubuntu1.1_amd64.deb ...
Unpacking ruby2.5-dev:amd64 (2.5.1-1ubuntu1.1) ...
Selecting previously unselected package ruby-dev:amd64.
Preparing to unpack .../ruby-dev_1%3a2.5.1_amd64.deb ...
Unpacking ruby-dev:amd64 (1:2.5.1) ...
Selecting previously unselected package ruby2.5-doc.
Preparing to unpack .../ruby2.5-doc_2.5.1-1ubuntu1.1_all.deb ...
Unpacking ruby2.5-doc (2.5.1-1ubuntu1.1) ...
Setting up ruby2.5-dev:amd64 (2.5.1-1ubuntu1.1) ...
Setting up ruby2.5-doc (2.5.1-1ubuntu1.1) ...
Setting up ruby-dev:amd64 (1:2.5.1) ...
user@hostname:/opt/metasploit-framework$

2. Next step, try to install the package again as follows :

user@hostname:/opt/metasploit-framework$ sudo gem install nokogiri -v '1.10.1'
Building native extensions. This could take a while...
Successfully installed nokogiri-1.10.1
Parsing documentation for nokogiri-1.10.1
Installing ri documentation for nokogiri-1.10.1
Done installing documentation for nokogiri after 6 seconds
1 gem installed
user@hostname:/opt/metasploit-framework$

3. Finally, try to execute the above command again to check if the solution is working or not.

Содержание

  1. Gem::Ext::BuildError: ERROR: Failed to build gem native extension. #3372
  2. Comments
  3. Installing Nokogiri¶
  4. Installing Native Gems¶
  5. Faster, more reliable installation¶
  6. Supported Platforms¶
  7. Why would I not want to use a native gem?¶
  8. How can I avoid using a precompiled native gem?¶
  9. Installing the ruby platform gem¶
  10. Installing Using The Packaged Libraries¶
  11. Ubuntu or Debian-based Distros¶
  12. Failed to build gem native extension #133
  13. Comments
  14. Footer

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

The text was updated successfully, but these errors were encountered:

  • i do not believe this is an issue with bundler

this looks like a permissions error. Bundler expects that you have permission to write to the directory the error:
Permission denied @ dir_s_mkdir — ./.gem.20150131-61502-djrp3
as well as an error that came from mkdir both suggest incorrect permissions. If you are on OSX user this is probably due to the inappropriate use of sudo. OSX by convention doesn’t use sudo for much of any CLI installation unless you are using Macports

if you are using brew try brew doctor for help. or uninstall and reinstall rbenv (including it’s dependencies from

/.rbenv ) the try reinstalling this.

also rbenv doesn’t install bundler by default it is plausible that you are using system bundler to try and install nokogiri even though you are using rbenv’s ruby.

if you run which bundler and the return value is not rbenv something something try this:

gem install bundler && rbenv rehash

I agree, this looks like filesystem permissions are set up incorrectly. Check permissions on your project directory and on /Users/ratciti/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.6.2 (I believe it changes to the gem directory before building) to make sure you can write files as the user that you’re running Bundler with.

What resolved my issue was to install bundler without sudo. «gem install bundler».

Installing bundle «gem install bundler» also solved my similar issue

I was using rbenv in Fedora and got the same message. I couldn’t understand why.
At the end, it was a lack of underneath packages, it was solved installing them:
sudo dnf install ruby-devel cmake mariadb-devel rubygems-devel
bundler update
bundler install

it works for fedora 22 too.

solved the problem

Thanks for the info! I ran into this and this resolved the problem quickly.

sudo apt-get install ruby2.2-dev

This solution works perfectly for me. thanks to @Abdull
sudo apt-get install ruby2.2-dev
and after I ran
bundle install

I used sudo apt-get install ruby2.2-dev
But I’m getting the following error:
Reading package lists. Done
Building dependency tree
Reading state information. Done
E: Unable to locate package ruby2.2-dev
E: Couldn’t find any package by regex ‘ruby2.2-dev’

My problem is this «Make sure that gem install debugger -v ‘1.6.8’ succeeds before bundling». I’ve tried install it, but the problem continues.

Should probably run gem bundler install? If that is what you intend to use.
Ie «bundle exec» etc.

I also personally use rvm for my ruby versions. It seems more maintainable.
On Apr 22, 2016 10:50 PM, «Dailson Campos» notifications@github.com wrote:

My problem is this «Make sure that gem install debugger -v ‘1.6.8’
succeeds before bundling error». What can I do?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#3372 (comment)

I run «bundle install».

➜ dailsoncampos git:(Production) ✗ bundle install
Fetching gem metadata from https://rubygems.org/.
Fetching version metadata from https://rubygems.org/.
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.
Using rake 11.1.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using mime-types 2.99
Using arel 6.0.3
Using debug_inspector 0.0.2
Using bundler 1.11.2
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using thor 0.19.1
Using columnize 0.9.0
Using concurrent-ruby 1.0.1
Using debugger-linecache 1.2.0
Using debugger-ruby_core_source 1.3.8
Using multi_json 1.11.2
Using sass 3.4.22
Using tilt 2.0.2
Using spring 1.6.4
Using sqlite3 1.3.11
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using nokogiri 1.6.7.2
Using rack-test 0.6.3
Using mail 2.6.3
Using binding_of_caller 0.7.2
Using coffee-script 2.4.1
Using uglifier 2.7.2
Using sprockets 3.5.2
Installing debugger 1.6.8 with native extensions

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

Источник

Installing Nokogiri¶

Welcome! We’ve worked hard to make Nokogiri easy and reliable to install. This page should hopefully get you on your way quickly.

The current version of this page focuses on the installation experience for Nokogiri v1.11 and later. If you’re trying to install an earlier version, please visit:

If this document doesn’t address your problem, please jump over to Getting Help.

If you’d like to contribute improvements to this document, please open a GitHub issue or pull-request on nokogiri.org/installing_nokogiri.md.

Installing Native Gems¶

Faster, more reliable installation¶

«Native gems» contain pre-compiled libraries for a specific machine architecture. On supported platforms, this removes the need for compiling the C extension and the packaged libraries, or to install system dependencies. This results in much faster installation and more reliable installation, which as you probably know have historically been challenging topics for Nokogiri users.

Supported Platforms¶

Nokogiri ships pre-compiled, «native» gems for the following platforms:

  • Linux x86-linux and x86_64-linux (req: glibc >= 2.17 ) including musl/Alpine
  • Linux aarch64-linux (req: glibc >= 2.29 ) including musl/Alpine
  • MacOS x86_64-darwin and arm64-darwin
  • Windows x86-mingw32 , x64-mingw32 , and x64-mingw-ucrt
  • Java platforms running JRuby 9.3 or higher

To determine whether your system supports one of these gems, look at the output of bundle platform or ruby -e ‘puts Gem::Platform.local.to_s’ .

If you’re on a supported platform, either gem install or bundle install should install a native gem without any additional action on your part. This installation should only take a few seconds, and your output should look something like:

If you’re using Bundler >= 2.2 , check that your lockfile knows about your platform(s). For example, if you develop on macOS and deploy to Linux you will need to run these commands in your development environment:

See man bundle-lock for details.

Why would I not want to use a native gem?¶

I can imagine some folks might have trust issues; if this is you, please let us know in a comment at RFC: Increase the level of trust in released gem files · Issue #2013 · sparklemotion/nokogiri. What can we do to increase that trust? (I can imagine providing a chain of custody including public build logs with cryptographic hashes of artifacts, but I’d like to hear from real users.)

Anybody on a linux system with an unsupported version of glibc (see Supported Platforms) will need to install from the ruby platform gem.

If you’re on Termux, you will need to install from the ruby platform gem (see https://wiki.termux.com/wiki/Differences_from_Linux for background).

If you have other reasons for not wanting to use a precompiled native gem, let us know! (See Getting Help.)

How can I avoid using a precompiled native gem?¶

The Nokogiri maintainers strongly urge you to use a native gem if at all possible. We expect it will be a much better experience for you and allow us to focus our efforts on improving functionality rather than diagnosing installation issues.

If you’re on a platform that supports a native gem but you want to avoid using it in your project, do one of the following:

  • With Bundler >= 2.3.18 , then update your Gemfile with gem «nokogiri», force_ruby_platform: true
  • Else with Bundler >= 2.1 , then run bundle config set force_ruby_platform true ,
  • Else with Bundler , then run bundle config force_ruby_platform true
  • If you’re not using Bundler, then run gem install nokogiri —platform=ruby .

Installing the ruby platform gem¶

Again, we recommend that you upgrade to v1.11 or later and use a native gem whenever possible. If you’re here, it should be because you’re on an older version, or you’re on an unsupported platform.

Before you begin, make sure you have the full compiler toolchain for compiling Ruby C Extensions. See Appendix A: The Compiler Toolchain.

Installing Using The Packaged Libraries¶

Nokogiri packages its own updated and patched copies of libxml2 and libxslt source code. By default, installation of Nokogiri will compile and use these packaged libraries.

If you don’t see your operating system / distro in this section, then no additional setup is required beyond Appendix A: The Compiler Toolchain. Just run gem install nokogiri —platform=ruby .

Ubuntu or Debian-based Distros¶

You may substitute git for patch ( mini_portile2 can use either for applying patches).

Источник

Failed to build gem native extension #133

I met a snag as the following:

The version of Ruby installed is ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux-gnu]

Could anyone please tell me why and how to tackle it? Thanks very much.

The text was updated successfully, but these errors were encountered:

Did you also install the development headers? They don’t seem to be present:

Do you mean installing ruby-dev? But the error remains the same after that step.

apt-get install ruby-dev

You need the Ruby 2.1 dev headers. Maybe @envygeeks would know more on how to get them.

sudo apt-get install ruby2.1-dev for 2.1.

There is something wrong with your apt source, Brightbox Ruby does have ruby2.1-dev but you can’t even reach it, which leads me to believe you need to remove the source and readd it.

I get this error when running sudo gem update github-pages . Is this related?

Updating installed gems
Updating github-pages
Building native extensions. This could take a while.
ERROR: Error installing github-pages:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile

make «DESTDIR=»
make: *** No rule to make target /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin14/ruby/config.h’, needed by autolink.o’. Stop.

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/redcarpet-3.3.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/redcarpet-3.3.2/ext/redcarpet/gem_make.out
Nothing to update

My Ruby version when running ruby -v is reported as:

ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

@martinbean Related, yes, but on a different platform.

@parkr Strange. I’m not running El Capitan (still on Mavericks).

Check out the SDK version in that stack trace.

Closing as stale.

if using ruby version 2.2 or greater you need to have ruby2.2-dev

sudo apt-get install ruby2.2-dev

You might take a look

I am having a similar error on RHEL 7. I have also installed ruby-devel and am receving this error:

gem install tiny_tds —source http://rubygems.org
Building native extensions. This could take a while.
ERROR: Error installing tiny_tds:
ERROR: Failed to build gem native extension.

mkmf.rb can’t find header files for ruby at /opt/rh/rh-ruby22/root/usr/share/include/ruby.h

extconf failed, exit code 1

@midacts It looks like you’re using a custom version of Ruby installed to /opt/rh/rh-ruby22/root/usr . Installing ruby-devel won’t install the headers into this location, but into /usr/share/include/ruby.h instead. You will need to install the headers for the binary located at /opt/rh/rh-ruby22/root/usr/bin/ruby .

Hi @parkr Could you elaborate on how to do that? I’m a complete ruby noob, I’m just trying to get the knife-azure gem installed for chef, and am getting this message: current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.7.0.1/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20170220-10621-ejv836.rb extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/include/ruby.h

I tried this command: sudo apt-get install ruby2.3-dev
Then tried to install gem again, got: E: Unable to locate package ruby2.3.0-dev

Any advice appreciated!

I’ve installed git for windows,JRuby,rjgit and gollum serval days ago,and they work well. But gollum doesn’t recognize the form of table.When i install github-markdown by the command of gem install github-markdown,the error comes.

I got error while installing gem install github-pages

windows 10 machine

I don’t know why I’m being pinged here, but switch to Linux on Windows, it’s better.

Hi there, sorry for respawning the thread but I preferred to do so as I think it applies to my issue.

I am trying to install Jekyll locally as per the official instructions. It fails when trying to build/install commonmarker:

Installing commonmarker 0.17.9 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/vincent/.gem/ruby/gems/commonmarker-0.17.9/ext/commonmarker
/usr/bin/ruby -r ./siteconf20180425-8716-wb76yr.rb extconf.rb
Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi —version 1.9.18
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json —version 1.8.6
Ignoring nokogiri-1.7.1 because its extensions are not built. Try: gem pristine nokogiri —version 1.7.1
mkmf.rb can’t find header files for ruby at /usr/share/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /home/vincent/.gem/ruby/gems/commonmarker-0.17.9 for inspection.
Results logged to /home/vincent/.gem/ruby/extensions/x86_64-linux/2.4.0/commonmarker-0.17.9/gem_make.out
An error occurred while installing commonmarker (0.17.9), and Bundler cannot continue.
Make sure that gem install commonmarker -v ‘0.17.9’ succeeds before bundling.
In Gemfile:
github-pages was resolved to 182, which depends on
jekyll-commonmark-ghpages was resolved to 0.1.5, which depends on
jekyll-commonmark was resolved to 1.2.0, which depends on
commonmarker

The issue is that ruby.h is present on my machine (this is Fedora 26), albeit in a different location: /usr/include/ruby.h

I have a workaround in that I just symlink /usr/share/include/ruby.h to that location but I am not sure what is the status of Jekyll support via Github on the various distros. Is that an expected error (I am a newbie for Ruby-related things)?

I had the same above issue but it turned out I did need to install the ruby headers

sudo apt-get install ruby-all-dev

Link to solutions for other distros: StackOverflow Answer

Mine also needed zlib, so:

sudo apt-get install zlib1g-dev

On a Mac, make sure that you have the commandline tools installed

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

26 Dec 2017

  • Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  • uninitialized constant Gem::BundlerVersionFinder (NameError)
  • can’t find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
    • sync Gemfile.lock to Bundler version
    • sync Bundler version to Gemfile.lock
  • [__NSCFConstantString initialize] may have been in progress in another thread when fork() was called

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

the error occurred after installing a new Ruby version (2.5.0):

$ bundle
...
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.

solution

try to update offending gem:

uninitialized constant Gem::BundlerVersionFinder (NameError)

$ berks
...
/Users/tap/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/dependency.rb:283:in `matching_specs': uninitialized constant Gem::BundlerVersionFinder (NameError)

solution

error was gone after upgrading Ruby version from 2.5.0 to 2.5.1:

$ echo 2.5.1 > .ruby-version

if this doesn’t help, try to clean up old versions of installed gems (this will
remove currently installed versions as well):

gem cleanup removes bundled gems only (gems specified in Gemfile of current
project) though it might affect other projects if they are using the same gems
(run bundle for those projects as well in that case).

UPDATE

it has turned out the problem was caused by specific version of either
berkshelf or chef or both.

old versions (error is present):

gem 'berkshelf', '6.3.1'
gem 'chef', '13.5.3'

old versions (error is gone):

gem 'berkshelf', '7.0.2'
gem 'chef', '14.1.1'

can’t find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)

$ bundle
Traceback (most recent call last):
	2: from /Users/tap/.rbenv/versions/2.5.0/bin/bundle:23:in `<main>'
	1: from /Users/tap/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/Users/tap/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)

solution

  1. https://stackoverflow.com/a/54038218/3632318

find current Bundler version:

$ gem list --local bundler

*** LOCAL GEMS ***

bundler (2.0.2)

find Bundler version in Gemfile.lock:

# Gemfile.lock

BUNDLED WITH
  1.16.1

now there are 2 possible solutions:

sync Gemfile.lock to Bundler version

  # Gemfile.lock

  BUNDLED WITH
-   1.16.1
+   2.0.1

sync Bundler version to Gemfile.lock

  1. https://bundler.io/blog/2019/01/04/an-update-on-the-bundler-2-release.html
$ gem install bundler -v 1.16.1

in many cases this solution is preferable since it’s easier and causes less
problems with CI and deployment.

[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called

$ rails console
[1] pry(main)> Profile.count
objc[29838]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[29838]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

solution

  1. https://github.com/puma/puma/issues/2084

error has something to do with the latest version of psql (12.1) that must be
used by pg gem (psql is provided by libpq package in my case).

  • edit libpq formula to install old version (11.7)

      # /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/libpq.rb
    
      class Libpq < Formula
        desc "Postgres C API library"
        homepage "https://www.postgresql.org/docs/12/libpq.html"
    -   url "https://ftp.postgresql.org/pub/source/v12.1/postgresql-12.1.tar.bz2"
    -   sha256 "a09bf3abbaf6763980d0f8acbb943b7629a8b20073de18d867aecdb7988483ed"
    +   url "https://ftp.postgresql.org/pub/source/v11.7/postgresql-11.7.tar.bz2"
    +   sha256 "324ae93a8846fbb6a25d562d271bc441ffa8794654c5b2839384834de220a313"
        revision 1
    
  • reinstall libpq package from source

    $ brew reinstall libpq --build-from-source
    $ psql --version
    psql (PostgreSQL) 11.7
    

    if you try to install libpq bottle (without --build-from-source option),
    brew will fallback to building from source because old versions of libpq
    bottle are not available.

  • reinstall pg gem to build native extensions against old version of libpq

    NOTE: it doesn’t work if you remove gem 'pg' from Gemfile manually and run
    bundle afterwards.

  • rollback changes in libpq formula

    $ cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
    $ git checkout Formula/libpq.rb
    $ cd -
    
  • reinstall libpq package

    $ brew reinstall libpq
    $ psql --version
    psql (PostgreSQL) 12.1
    

Problem

After upgrading to Mac OS Big Sur, I saw this error I haven’t seen before:

➜  bundle exec jekyll serve
Could not find commonmarker-0.17.13 in any of the sources
Run `bundle install` to install missing gems.

So I ran bundle install but it didn’t seem to work either. An excerpt from the terminal output:

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

An error occurred while installing commonmarker (0.17.13), and Bundler cannot continue.
Make sure that `gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'` succeeds before bundling.

An error occurred while installing unf_ext (0.0.7.7), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.7' --source 'https://rubygems.org/'` succeeds before bundling.

An error occurred while installing rdiscount (2.2.0.2), and Bundler cannot continue.
Make sure that `gem install rdiscount -v '2.2.0.2' --source 'https://rubygems.org/'` succeeds before bundling.

Solution

After some research and trial and error, I found this precious answer in Stack Overflow that it is due to the Ruby version that is not compatible with Big
Sur and it should be at least 2.7. So I
checked Ruby releases and decided to go with one of the most recent releases: 2.7.2.

Anyway, steps I think worked:

  1. Check Ruby version
     ➜  ruby -v
     ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    
  2. Install Ruby Version Manager (rvm)
     ➜  curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
    
  3. Install 2.7.2 version using rvm
     ➜  rvm install "ruby-2.7.2"
    
  4. Check Ruby version again
     ➜  ruby -v
     ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]
    
  5. Bundle install
  6. Run bundle
     ➜  bundle exec jekyll serve
    

And it worked!

Some other things I tried

  1. Installing Ruby through Homebrew: didn’t solve the issue but I don’t know if this actually and eventually helped or
    not.

  2. Installing the latest version of Ruby (ref) using rvm: didn’t update the version
    for some reason.

     ➜  rvm install ruby@latest
    

This post describes in detail on howto install Redmine latest version on Ubuntu 18.04 -x86_64 GNU/Linux system. Redmine is one of the most widely used open source software tool and platform for project management, issue tracking and project execution. With lot of freely available plugins one can also use Redmine as CMS, Invoicing, finance, HR and most of the activities that are involved in small scale software company. If you are startup company and looking for all in one tool Redmine is answer.

This guide is little bit lengthy as there are few workaround during installation, so grab your coffee before you start.

If your system does not have apache server installed then follow step 1, else skip to step 2.

To ensure apache server is installed and running open any webbrowser like mozilla, chrome and type ‘localhost’ if you see “can’t establish a connection to the server at localhost” then you need to install apache else you will see “Apache2 Ubuntu Default Page”

Contents

  • 1 Step 1: Install Apache2 Server on Ubuntu
  • 2 Step 2 – Get Redmine application
  • 3 Step 3 – Install MySQL and Create an empty Redmine database
  • 4 Step 4 – Database Configuration
  • 5 Step 5 – Dependencies installation
      • 5.0.1 RMagick (allows the use of ImageMagick to manipulate images for PDF and PNG export)
  • 6 Step 6 — Database schema objects creation
  • 7 Step 7 – Test The Installation
  • 8 Share this:
  • 9 Like this:
  • 10 Related

Step 1: Install Apache2 Server on Ubuntu

$sudo apt install apache2 libapache2-mod-passenger

Now that Apache2 is installed, to test whether the web server is working, open your browser and type http://localhost

you will see “Apache2 Ubuntu Default Page”

Step 2 – Get Redmine application

Get the Redmine source code by either downloading a packaged release from download page.

Copy this file to /usr/share

$sudo cp redmine-4.0.3.tar.gz /usr/share/

Then to unpack a tar.gz file, use the tar command from the shell

$sudo tar -xvzf redmine-4.0.3.tar.gz

And remove redmine-4.0.3.tar.gz file from /usr/share. You can now see following folder structure

Redmine 4.0.3 folder structure

you can also check out stable redmine version from svn , by running below command,

$svn co https://svn.redmine.org/redmine/branches/4.0-stable redmine-4.0

Step 3 – Install MySQL and Create an empty Redmine database

Create MySQL database with user name as ‘redmine’

Assuming this is fresh Ubuntu 18.04.2 LTS and MySQL is not installed, execute following command to install MySQL

/usr/share/redmine-4.0.3$ sudo apt-get install mysql-server mysql-client

Once installed check out MySQL version

/usr/share/redmine-4.0.3
$ mysql –version

mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using EditLine wrapper, Redmine 4.0 does not support for MySQL < 5.5

Note-

Then create empty database – To do this change to sudo user and execute mysql commands as listed out below.

$sudo -i
$mysql 
mysql> CREATE DATABASE redmine CHARACTER SET utf8mb4;
Query OK, 1 row affected (0.01 sec)
mysql> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my password';
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
Query OK, 0 rows affected (0.02 sec)

Step 4 – Database Configuration

Copy
config/database.yml.example
to
config/database.yml
and edit this file in order to configure your database settings for “production” environment.

production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "my_password" 

Step 5 – Dependencies installation

This is step you will need coffee 🙂 make sure you have refilled your cup. install Bundler

/usr/share/redmine-4.0.3 $sudo gem install bundler

Then install required Redmine gems, there are 59 gems required at this step

/usr/share/redmine-4.0.3
$sudo
bundle install --without development test

/usr/share/redmine-4.0.3$ sudo bundle install --without development test 
Don&apos;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. The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`. Fetching gem metadata from https://rubygems.org/................ Fetching gem metadata from https://rubygems.org/.. Resolving dependencies...
Fetching rake 12.3.2
Installing rake 12.3.2
Fetching concurrent-ruby 1.1.5
Installing concurrent-ruby 1.1.5
Fetching i18n 0.7.0
Installing i18n 0.7.0
Fetching minitest 5.11.3
Installing minitest 5.11.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching activesupport 5.2.2.1
Installing activesupport 5.2.2.1
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.8.0
Installing erubi 1.8.0
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.3
Installing nokogiri 1.10.3 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.10.3/ext/nokogiri /usr/bin/ruby2.5 -r ./siteconf20190424-9657-1w4lnbg.rb extconf.rb mkmf.rb can&apos;t find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1

Well this is first encounter ‘nokogiri’ has failed
To solve this error mannually install ‘nokogiri’ after installing following dependencies

/usr/share/redmine-4.0.3 $sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
/usr/share/redmine-4.0.3$ sudo gem install nokogiri -v 1.10.3 
Building native extensions. This could take a while...
Successfully installed nokogiri-1.10.3
Parsing documentation for nokogiri-1.10.3
Installing ri documentation for nokogiri-1.10.3
Done installing documentation for nokogiri after 2 seconds
1 gem installed

Now continue with installing dependencies, Check out our services and offerings at RedmineLab.com

/usr/share/redmine-4.0.3$ sudo bundle install --without development test
Don&apos;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.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.7.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2.1
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.3
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.4
Installing crass 1.0.4
Fetching loofah 2.2.3
Installing loofah 2.2.3
Fetching rails-html-sanitizer 1.0.4
Installing rails-html-sanitizer 1.0.4
Fetching actionview 5.2.2.1
Installing actionview 5.2.2.1
Fetching rack 2.0.7
Installing rack 2.0.7
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching actionpack 5.2.2.1
Installing actionpack 5.2.2.1
Fetching nio4r 2.3.1
Installing nio4r 2.3.1 with native extensions
Fetching websocket-extensions 0.1.3
Installing websocket-extensions 0.1.3
Fetching websocket-driver 0.7.0
Installing websocket-driver 0.7.0 with native extensions
Fetching actioncable 5.2.2.1
Installing actioncable 5.2.2.1
Fetching globalid 0.4.2
Installing globalid 0.4.2
Fetching activejob 5.2.2.1
Installing activejob 5.2.2.1
Fetching mini_mime 1.0.1
Installing mini_mime 1.0.1
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching actionmailer 5.2.2.1
Installing actionmailer 5.2.2.1
Fetching method_source 0.9.2
Installing method_source 0.9.2
Using thor 0.20.3
Fetching railties 5.2.2.1
Installing railties 5.2.2.1
Fetching actionpack-xml_parser 2.0.1
Installing actionpack-xml_parser 2.0.1
Fetching activemodel 5.2.2.1
Installing activemodel 5.2.2.1
Fetching arel 9.0.0
Installing arel 9.0.0
Fetching activerecord 5.2.2.1
Installing activerecord 5.2.2.1
Fetching mimemagic 0.3.3
Installing mimemagic 0.3.3
Fetching marcel 0.3.3
Installing marcel 0.3.3
Fetching activestorage 5.2.2.1
Installing activestorage 5.2.2.1
Fetching public_suffix 3.0.3
Installing public_suffix 3.0.3
Fetching addressable 2.6.0
Installing addressable 2.6.0
Using bundler 2.0.1
Fetching css_parser 1.7.0
Installing css_parser 1.7.0
Fetching csv 3.0.9
Installing csv 3.0.9
Fetching htmlentities 4.3.4
Installing htmlentities 4.3.4
Fetching mysql2 0.5.2
Installing mysql2 0.5.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/mysql2-0.5.2/ext/mysql2
/usr/bin/ruby2.5 -I /usr/local/lib/site_ruby/2.5.0 -r ./siteconf20190424-20515-dxgpwf.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... yes
checking for -lmysqlclient... no

This is second encounter of builderror, here mysql client is missing. You need to install mysql client by running following command

/usr/share/redmine-4.0.3
$apt-get install libmysqlclient-dev
/usr/share/redmine-4.0.3$ sudo bundle install --without development test
Don&apos;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.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.7.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2.1
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.3
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.0.4
Using actionview 5.2.2.1
Using rack 2.0.7
Using rack-test 1.1.0
Using actionpack 5.2.2.1
Using nio4r 2.3.1
Using websocket-extensions 0.1.3
Using websocket-driver 0.7.0
Using actioncable 5.2.2.1
Using globalid 0.4.2
Using activejob 5.2.2.1
Using mini_mime 1.0.1
Using mail 2.7.1
Using actionmailer 5.2.2.1
Using method_source 0.9.2
Using thor 0.20.3
Using railties 5.2.2.1
Using actionpack-xml_parser 2.0.1
Using activemodel 5.2.2.1
Using arel 9.0.0
Using activerecord 5.2.2.1
Using mimemagic 0.3.3
Using marcel 0.3.3
Using activestorage 5.2.2.1
Using public_suffix 3.0.3
Using addressable 2.6.0
Using bundler 2.0.1
Using css_parser 1.7.0
Using csv 3.0.9
Using htmlentities 4.3.4
Fetching mysql2 0.5.2
Installing mysql2 0.5.2 with native extensions
Fetching net-ldap 0.16.1
Installing net-ldap 0.16.1
Fetching ruby-openid 2.3.0
Installing ruby-openid 2.3.0
Fetching rack-openid 1.4.2
Installing rack-openid 1.4.2
Fetching sprockets 3.7.2
Installing sprockets 3.7.2
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Fetching rails 5.2.2.1
Installing rails 5.2.2.1
Fetching rbpdf-font 1.19.1
Installing rbpdf-font 1.19.1
Fetching rbpdf 1.19.8
Installing rbpdf 1.19.8
Fetching redcarpet 3.4.0
Installing redcarpet 3.4.0 with native extensions
Fetching request_store 1.0.5
Installing request_store 1.0.5
Fetching rmagick 2.16.0
Installing rmagick 2.16.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
ERROR:  Error installing rmagick:
current directory: /var/lib/gems/2.5.0/gems/rmagick-2.16.0/ext/RMagick
/usr/bin/ruby2.5 -I /usr/local/lib/site_ruby/2.5.0 -r ./siteconf20190424-21434-cp20lm.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc&apos;
to the PKG_CONFIG_PATH environment variable
No package &apos;MagickCore&apos; found
checking for outdated ImageMagick version (<= 6.4.9)... *** extconf.rb failed ***

This is third and last encounter of BuildError and it is for RMagick, one can continue without RMagic by running following command.

RMagick (allows the use of ImageMagick to manipulate images for PDF and PNG export)

If you want to skip the installation of the rmagick gem, then execute below command:

/usr/share/redmine-4.0.3 $sudo bundle install --without development test rmagick

Else you can install ImageMagick after installing its dependency as follows

/usr/share/redmine-4.0.3 $sudo apt-get install libmagickwand-dev
/usr/share/redmine-4.0.3$ sudo gem install rmagick 
Fetching rmagick-3.1.0.gem Building native extensions.
This could take a while...
Successfully installed rmagick-3.1.0
Parsing documentation for rmagick-3.1.0 Installing ri documentation for rmagick-3.1.0
Done installing documentation for rmagick after 1 seconds
1 gem installed
/usr/share/redmine-4.0.3$ sudo bundle install --without development test 
Don&apos;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. The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
Fetching gem metadata from https://rubygems.org/............. Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.7.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2.1
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.3
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.0.4
Using actionview 5.2.2.1
Using rack 2.0.7
Using rack-test 1.1.0
Using actionpack 5.2.2.1
Using nio4r 2.3.1
Using websocket-extensions 0.1.3
Using websocket-driver 0.7.0
Using actioncable 5.2.2.1
Using globalid 0.4.2
Using activejob 5.2.2.1
Using mini_mime 1.0.1
Using mail 2.7.1
Using actionmailer 5.2.2.1
Using method_source 0.9.2
Using thor 0.20.3
Using railties 5.2.2.1
Using actionpack-xml_parser 2.0.1
Using activemodel 5.2.2.1
Using arel 9.0.0
Using activerecord 5.2.2.1
Using mimemagic 0.3.3
Using marcel 0.3.3
Using activestorage 5.2.2.1
Using public_suffix 3.0.3
Using addressable 2.6.0
Using bundler 2.0.1
Using css_parser 1.7.0
Using csv 3.0.9
Using htmlentities 4.3.4
Using mysql2 0.5.2
Using net-ldap 0.16.1
Using ruby-openid 2.3.0
Using rack-openid 1.4.2
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 5.2.2.1
Using rbpdf-font 1.19.1
Using rbpdf 1.19.8
Using redcarpet 3.4.0
Using request_store 1.0.5
Fetching rmagick 2.16.0
Installing rmagick 2.16.0 with native extensions
Fetching roadie 3.4.0
Installing roadie 3.4.0
Fetching roadie-rails 1.3.0
Installing roadie-rails 1.3.0
Fetching rouge 3.3.0
Installing rouge 3.3.0
Bundle complete! 27 Gemfile dependencies, 59 gems now installed. Gems in the groups development and test were not installed. Use `bundle info [gemname]` to see where a bundled gem is installed.


Step 6 - Database schema objects creation

Generate a random key used by Rails to encode cookies storing session data thus preventing their tampering.
$bundle exec rake generate_secret_token

Create the database structure, by running the following command under the application root directory (in my case its -/usr/share/redmine-4.0.3 $):

/usr/share/redmine-4.0.3 $RAILS_ENV=production bundle exec rake db:migrate

This step wil take some time as it creates
database schema and strucutre, make sure that username and password
is correct in ‘config/database.yml’ file.

/usr/share/redmine-4.0.3# RAILS_ENV=production bundle exec rake db:migrate
== 1 Setup: migrating =========================================================
-- adapter_name()
-> 0.0000s
-- adapter_name()
-> 0.0000s
-- adapter_name()
-> 0.0000s
-- create_table("attachments", {:options=>"ENGINE=InnoDB", :force=>true, :id=>:integer})
-> 0.3043s
-- adapter_name()
-> 0.0000s
-- adapter_name()
-> 0.0000s
-- adapter_name()
-> 0.0000s
-- create_table("auth_sources", {:options=>"ENGINE=InnoDB", :force=>true, :id=>:integer})
-> 0.2463s
-- adapter_name()
-> 0.0000s
-- adapter_name()
-> 0.0000s
-- adapter_name()
-> 0.0000s
-- create_table("custom_fields", {:options=>"ENGINE=InnoDB", :force=>true, :id=>:integer})
-> 0.3116s
== 20170419144536 AddViewMessagesToAllExistingRoles: migrating ================
== 20170419144536 AddViewMessagesToAllExistingRoles: migrated (0.1432s) =======
== 20170723112801 RenameCommentsToContent: migrating ==========================
-- rename_column(:comments, :comments, :content)
-> 0.1457s
== 20170723112801 RenameCommentsToContent: migrated (0.1458s) =================
== 20180913072918 AddVerifyPeerToAuthSources: migrating =======================
-- change_table(:auth_sources)
-> 0.8880s
== 20180913072918 AddVerifyPeerToAuthSources: migrated (0.8882s) ==============
== 20180923082945 ChangeSqliteBooleansTo0And1: migrating ======================
== 20180923082945 ChangeSqliteBooleansTo0And1: migrated (0.0000s) =============
== 20180923091603 ChangeSqliteBooleansDefault: migrating ======================
== 20180923091603 ChangeSqliteBooleansDefault: migrated (0.0000s) =============

Then insert default configuration data in database, by running the following command: This step will ask to select language. In my case I have selected 'en' for English.

/usr/share/redmine-4.0.3$ RAILS_ENV=production bundle exec rake redmine:load_default_data 

Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, es-PA, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] en ==================================== Default configuration data loaded.

Step 7 – Test The Installation

Test the installation by running WEBrick web server:

/usr/share/redmine-4.0.3
$bundle exec rails server webrick -e production

http://localhost:3000/

Use default administrator account to log in:

  • login: admin
  • password: admin

Redmine 4.0.3

Above steps explains about how to install latest Redmine on Ubuntu, there is alternative to this mannual installation.

Alternative to manual installation

There is alternative to above steps, if you do not want to go for above lengthy steps one can follow Easy redmine installation stpes on Ubuntu, But keep in mind, this alternative installation step will install –Redmine 3.4.4. And most of the free plugins simply do not work on this redmine version.

Redmine 3.4.4 version

That’s it!

You have successfully installed Redmine on Ubuntu 18.04 and 18.10….

Happy bugging.

Feel free to drop a comment or email @ info@blog.neudeep.com, if you get stuck somewhere, we will try to help you as much as possible. Check out our services and offerings at RedmineLab.com

Install Plugin

Following steps explain about how to install new plugin in to make full use of Redmine. Redmine is powerfull tool but with diffrent plugins its very easy to untilize Redmine’s full power.

Navigate to ‘plugins’ directory of redmine

/usr/share/redmine-4.0.3/plugins
$git clone git://github.com/deecay/redmine_pivot_table

/usr/share/redmine-4.0.3
$sudo RAILS_ENV=production rake redmine:plugins:migrate

Test it using webrick server

/usr/share/redmine-4.0.3
$bundle exec rails server webrick -e production

30 Dec 2016

Why ruby 2.1.5 instead of 2.2.3+?

One reason why I usually recommend using an older ruby version (2.1.5)
over the latest was I had some bad gem install experiences with ruby
2.2.3, most notably:
nokogiri.

Getting a new project ready for development on a new system was not a
simple as: bundle, because of these dreaded lines:

Fetching: nokogiri-1.7.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
        ERROR: Failed to build gem native extension.

I thought I was the only one with this issue, but I
wasn’t. It turned out to be
a combo of things (one of them was because of ruby 2.2.3!)

I solved the issue somehow, but never remembered the steps, so every
new system I wanted to do any work always had issues around getting
gems installed. Hence, my reluctance on recommending a newer version
of ruby, especially 2.2.3. I wanted to focus on programming, not
solving weird setup problems, so ruby 2.1.5 was my recommended default.

Fixing Gem Installs

Instead of just letting this knowledge be rediscovered each time, I am
writing them here so it’s easier for me and others to find. I have
techniques to fix issues with header files, missing tools, and library
linking.

Missing header file issues are easy to fix because the error message
will usually tell what is missing or needed. For example, this is the
message when installing the Postgresql or
pg gem:

Building native extensions.  This could take a while...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/user/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20161228-24260-rx9bta.rb extconf.rb
    checking for pg_config... no
    No pg_config... trying anyway. If building fails, please try again with
     --with-pg-config=/path/to/pg_config
     checking for libpq-fe.h... no
     Can't find the 'libpq-fe.h header
     *** 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.

The key piece of information is: Can't find the 'libpq-fe.h header.

A quick search for that file with the operating system usually
recommends a solution to install the libpg-dev package, and the
solution for Ubuntu would be as simple as: sudo apt-get install
libpq-dev
.

Another problem could be around missing tooling, such as a special
version of cmake for the
rugged gem. This is an error
encountered when trying to install a gem without the right build tool
on the system.

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

    /home/user/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20161228-31966-1asakes.rb extconf.rb
    checking for gmake... no
    checking for make... yes
    checking for cmake... no
    ERROR: CMake is required to build Rugged.
    *** 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.

The key piece of information is: ERROR: CMake is required to build
Rugged.

This one is a bit harder to solve. I have solved it by using a
different repository for cmake using this
answer.

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake

Missing or Unlinkable Libraries

The hardest problem I had when installing gems are ones involving
missing libraries, where the error are in the form of:

/home/user/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20150905-15835-17vnavf.rb extconf.rb
checking if the C compiler accepts ...
*** 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.

As there is no specific detail other than something failing, there
needs to be some digging, so let’s look at the mkmf.log file.

note: the mkmf.log can be found using: locate mkmf.log or in the
gem’s build folder, for this example nokogiri:
/home/user/.rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.7.0/mkmf.log

In the mkmf.log file, the last paragraph is:

"gcc -o conftest -I/home/user/.rvm/rubies/ruby-2.2.3/include/ruby-2.2.0/x86_64-linux -I/home/user/.rvm/rubies/ruby-2.2.3/include/ruby-2.2.0/ruby/backward -I/home/user/.rvm/rubies/ruby-2.2.3/include/ruby-2.2.0 -I.     -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat  -fPIC  conftest.c  -L. -L/home/user/.rvm/rubies/ruby-2.2.3/lib -Wl,-R/home/user/.rvm/rubies/ruby-2.2.3/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic     -Wl,-rpath,'/../lib' -Wl,-R'/../lib' -lruby  -lpthread -lgmp -ldl -lcrypt -lm   -lc "
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

note: Original error
message here, I could not
reproduce it again on my system

The key piece of information is: /usr/bin/ld: cannot find -lgmp

Solving this might require one or two additional steps: installing the
missing library and/or making the library linkable.

Missing Library

Fixing missing library is as easy as looking up how to install the
library package and following those steps. In this case, searching for
how to install libgmp on the system will probably fix this problem.

note: on library naming convention and the linker: even though the
line only has gmp, the library name is: libgmp. The linker, ld,
has the argument -lgmp, and -l is shorthand for lib. If the
argument was ld -llibgmp, then the expected library name would:
liblibgmp.)

Unlinkable Library

If after installing the library, and the same error persists, I have
found the problem is because the library has been installed but the
linker cannot find the library in its path (aka
LD_LIBRARY_PATH)

The easiest way I have found to fix this problem is to look at what
the linker is missing by directly executing the ld command for the
library. This is a fantastic piece of advice I found
here

ld -l<missing library name> --verbose

So, if libgmp is installed, but the gem still won’t install, checkout
what the linker is doing, but executing:

[email protected]:~$ ld -lgmp --verbose

It’s output:

attempt to open /usr/x86_64-linux-gnu/lib64/libgmp.so failed
attempt to open /usr/x86_64-linux-gnu/lib64/libgmp.a failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libgmp.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libgmp.a failed
attempt to open //usr/local/lib64/libgmp.so failed
attempt to open //usr/local/lib64/libgmp.a failed
attempt to open //lib/x86_64-linux-gnu/libgmp.so failed
attempt to open //lib/x86_64-linux-gnu/libgmp.a failed
attempt to open //lib64/libgmp.so failed
attempt to open //lib64/libgmp.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libgmp.so failed
attempt to open //usr/lib/x86_64-linux-gnu/libgmp.a failed
attempt to open //usr/lib64/libgmp.so failed
attempt to open //usr/lib64/libgmp.a failed
attempt to open //usr/local/lib/libgmp.so failed
attempt to open //usr/local/lib/libgmp.a failed
attempt to open //lib/libgmp.so failed
attempt to open //lib/libgmp.a failed
attempt to open //usr/lib/libgmp.so failed
attempt to open //usr/lib/libgmp.a failed
ld: cannot find -lgmp

Here, the locate or find is your friend here: use locate to find
the actual installed library on your system with a similar name:

[email protected]:~$ locate libgmp

and the output maybe:

/home/user/.rvm/log/1477953355_ruby-2.1.15/package_install_g++_gcc_make_libc6-dev_libreadline6-dev_zlib1g-dev_libssl-dev_libyaml-dev_libsqlite3-dev_sqlite3_autoconf_libgmp-dev_libgdbm-dev_libncurses5-dev_automake_libtool_bison_pkg-config_libffi-dev.log
/usr/lib/x86_64-linux-gnu/libgmp.so.10
/usr/lib/x86_64-linux-gnu/libgmp.so.10.1.3
/usr/lib/x86_64-linux-gnu/libgmpxx.a
/usr/lib/x86_64-linux-gnu/libgmpxx.so
/usr/lib/x86_64-linux-gnu/libgmpxx.so.4
/usr/lib/x86_64-linux-gnu/libgmpxx.so.4.3.3
/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines/libgmp.so
/usr/share/doc/libgmp-dev
/usr/share/doc/libgmp10
/usr/share/doc/libgmpxx4ldbl
/usr/share/doc/libgmp-dev/AUTHORS
/usr/share/doc/libgmp-dev/NEWS.gz
/usr/share/doc/libgmp-dev/README
/usr/share/doc/libgmp-dev/changelog.Debian.gz
/usr/share/doc/libgmp-dev/copyright
/usr/share/doc/libgmp10/README.Debian
/usr/share/doc/libgmp10/changelog.Debian.gz
/usr/share/doc/libgmp10/copyright
/usr/share/doc/libgmpxx4ldbl/changelog.Debian.gz
/usr/share/doc/libgmpxx4ldbl/copyright
/usr/share/lintian/overrides/libgmpxx4ldbl
/var/lib/dpkg/info/libgmp-dev:amd64.list
/var/lib/dpkg/info/libgmp-dev:amd64.md5sums
/var/lib/dpkg/info/libgmp10:amd64.list
/var/lib/dpkg/info/libgmp10:amd64.md5sums
/var/lib/dpkg/info/libgmp10:amd64.postinst
/var/lib/dpkg/info/libgmp10:amd64.postrm
/var/lib/dpkg/info/libgmp10:amd64.shlibs
/var/lib/dpkg/info/libgmpxx4ldbl:amd64.list
/var/lib/dpkg/info/libgmpxx4ldbl:amd64.md5sums
/var/lib/dpkg/info/libgmpxx4ldbl:amd64.postinst
/var/lib/dpkg/info/libgmpxx4ldbl:amd64.postrm
/var/lib/dpkg/info/libgmpxx4ldbl:amd64.shlibs

In this case, the missing library looks to be:

/usr/lib/x86_64-linux-gnu/libgmp.so.10

and it is in one of the LD_LIBRARY_PATH the linker is using, but the
linker specifically wants a different name, because of this linker
message:

attempt to open /usr/x86_64-linux-gnu/lib64/libgmp.so failed

To fix: create a symbolic link so ld can find it. In this case:

[email protected]:~$ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10 /usr/lib/x86_64-linux-gnu/libgmp.so

Summary

Three common errors where gem installation can go bad are presented:
missing and/or unlinkable libraries, compilation tools are missing, or
missing header files. Their solutions involve looking for key pieces
of information, some searching, and installation and/or setup.

I kept my development environment in a single place since I was scared
of debugging failing gem installs on different environments. Now with
these tools, I will be taking my development environments to more
places!

Go Forth & bundle everywhere!

I have the following Dockerfile:

FROM debian:stretch-backports
RUN apt-get update  && apt-get install -y --no-install-recommends 
        build-essential 
        ruby ruby-dev 
        curl wget 
        gnupg 
        git 
        ncbi-blast+ zlib1g-dev

RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && 
        apt-get update  && apt-get install -y --no-install-recommends 
        nodejs && 
        rm -rf /var/lib/apt/lists/*

RUN gem install bundler && 
    wget -c https://github.com/wurmlab/sequenceserver/archive/1.1.0.beta12.tar.gz  && 
    tar xfvz 1.1.0.beta12.tar.gz && 
    cd sequenceserver-1.1.0.beta12 && 
    npm install && 
    bundle instal

which caused the following error:

...
Installing childprocess 1.0.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/childprocess-1.0.1/ext
/usr/bin/ruby2.3 mkrf_conf.rb

current directory: /var/lib/gems/2.3.0/gems/childprocess-1.0.1/ext
/usr/bin/ruby2.3 -rubygems
/usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake
RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.1
RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.1
/usr/bin/ruby2.3: No such file or directory --
/usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/childprocess-1.0.1
for inspection.
Results logged to
/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.1/gem_make.out

An error occurred while installing childprocess (1.0.1), and Bundler cannot
continue.
Make sure that `gem install childprocess -v '1.0.1' --source
'http://rubygems.org/'` succeeds before bundling.

In Gemfile:
  selenium-webdriver was resolved to 3.142.3, which depends on
    childprocess

What did I miss?

Thank you in advance

asked Aug 9, 2019 at 11:28

user977828's user avatar

First of all, there is a typo at the end of your Dockerfile, but I think this comes from copy & paste.

However, I got it building by installing rake first.
So your last Docker command should be:

RUN gem install bundler && 
    gem install rake && 
    wget -c https://github.com/wurmlab/sequenceserver/archive/1.1.0.beta12.tar.gz  && 
    tar xfvz 1.1.0.beta12.tar.gz && 
    cd sequenceserver-1.1.0.beta12 && 
    npm install && 
    bundle install

answered Aug 9, 2019 at 12:18

thinkingeye's user avatar

Проблемы при генерации bundle install:

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

current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator
/usr/local/rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160721-8878-1yafz8p.rb extconf.rb
creating Makefile

current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator
make «DESTDIR=» clean

current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator
make «DESTDIR=»
compiling generator.c
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
../fbuffer/fbuffer.h:175:47: error: macro «rb_str_new» requires 2 arguments, but only 1 given
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from pointer without a cast [enabled by default]
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.3.0/gems/json-1.8.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/json-1.8.1/gem_make.out
Using minitest 5.4.1
Using thread_safe 0.3.4
Using builder 3.2.2
Using erubis 2.7.0
Using rack 1.5.2
Using mime-types 1.25.1
Using polyglot 0.3.5
Using sass 3.2.19
Using thor 0.19.1
Using coffee-script-source 1.8.0
Using execjs 2.2.1
Using arel 5.0.1.20140414130214
Using bundler 1.12.5
Using hike 1.2.3
Using multi_json 1.10.1
Using tilt 1.4.1
Using addressable 2.3.6
Using bcrypt 3.1.7
Using coderay 1.1.0
Using debug_inspector 0.0.2
Using colorize 0.7.3
Using net-ssh 2.9.1
Using chunky_png 1.3.1
Using fssm 0.2.10
Using orm_adapter 0.5.0
Using libv8 3.16.14.3
Using modernizr-rails 2.7.1
Using normalize-rails 3.0.1
Using pg 0.17.1
Using ref 1.0.5
Using spring 1.1.3
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v ‘1.8.1’` succeeds before bundling.
~/workspace (master) $ gem list

*** LOCAL GEMS ***

actionmailer (4.2.5)
actionpack (4.2.5)
actionview (4.2.5)
activejob (4.2.5)
activemodel (4.2.5)
activerecord (4.2.5)
activesupport (4.2.5)
addressable (2.3.6)
arel (6.0.3, 5.0.1.20140414130214)
bcrypt (3.1.7)
bigdecimal (1.2.8)
binding_of_caller (0.7.2)
builder (3.2.2)
bundler (1.12.5)
bundler-unload (1.0.2)
byebug (9.0.5)
chunky_png (1.3.1)
coderay (1.1.0)
coffee-rails (4.1.1)
coffee-script (2.4.1)
coffee-script-source (1.10.0, 1.8.0)
colorize (0.7.3)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
did_you_mean (1.0.0)
erubis (2.7.0)
execjs (2.7.0, 2.2.1)
executable-hooks (1.3.2)
fssm (0.2.10)
gem-wrappers (1.2.7)
globalid (0.3.6)
hike (1.2.3)
i18n (0.7.0, 0.6.11)
io-console (0.4.5)
jbuilder (2.5.0)
jquery-rails (4.1.1)
json (2.0.1, 1.8.3, 1.8.2)
libv8 (3.16.14.3 x86_64-linux)
loofah (2.0.3)
mail (2.6.4)
mime-types (3.1, 1.25.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.0, 5.8.3, 5.4.1)
modernizr-rails (2.7.1)
multi_json (1.12.1, 1.10.1)
net-ssh (2.9.1)
net-telnet (0.1.1)
nokogiri (1.6.8)
normalize-rails (3.0.1)
orm_adapter (0.5.0)
pg (0.17.1)
pkg-config (1.1.7)
polyglot (0.3.5)
power_assert (0.2.6)
psych (2.0.17)
rack (1.6.4, 1.5.2)
rack-test (0.6.3)
rails (4.2.5)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.7)
rails-html-sanitizer (1.0.3)
railties (4.2.5)
rake (11.2.2, 10.4.2, 10.3.2)
rdoc (4.2.2, 4.2.1)
ref (1.0.5)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
sass (3.4.22, 3.2.19)
sass-rails (5.0.5)
sdoc (0.4.1)
spring (1.7.1, 1.1.3)
sprockets (3.6.2)
sprockets-rails (3.1.1)
sqlite3 (1.3.11)
test-unit (3.1.5)
thor (0.19.1)
thread_safe (0.3.5, 0.3.4)
tilt (2.0.5, 1.4.1)
turbolinks (5.0.0)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
uglifier (3.0.0)
web-console (2.3)
~/workspace (master) $
Версии:
ruby 2.3.0
rails 4.2.5
Ни в какую,испробовал все.Есть ли лечение от зависимостей по данному вопросу?Спасибо.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Geforce game ready driver продолжить установку невозможно произошла ошибка
  • Geforce experience произошла ошибка перезапустите игру чтобы использовать эту возможность
  • Geforce experience ошибка трансляции на youtube
  • Geforce experience ошибка сканирования
  • Geforce experience ошибка 0ч0003

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии