0

I find some trouble to bundle install some gems like nokogiri, eventmachine, json, http_parser.rb, yajl-ruby on production server. I use capistrano to deploy the app,

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/deployer/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
Results logged to /home/deployer/apps/yanny/shared/bundle/ruby/2.0.0/gems/gemname/ext/gem_make.out
Make sure that gem install X succeeds before bundling.

if i try to install missing gem through server it works and bundle install stops asking for it:

gem install x -v y --install-dir /home/deployer/apps/holo/shared/bundle/ruby/2.0.0/

here is my gem environment:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.1.11
  - RUBY VERSION: 2.0.0 (2013-11-22 patchlevel 353) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/deployer/.rvm/gems/ruby-2.0.0-p353
  - RUBY EXECUTABLE: /home/deployer/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
  - EXECUTABLE DIRECTORY: /home/deployer/.rvm/gems/ruby-2.0.0-p353/bin
  - SPEC CACHE DIRECTORY: /home/deployer/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/deployer/.rvm/gems/ruby-2.0.0-p353
     - /home/deployer/.rvm/gems/ruby-2.0.0-p353@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/deployer/.rvm/gems/ruby-2.0.0-p353/bin
     - /home/deployer/.rvm/gems/ruby-2.0.0-p353@global/bin
     - /home/deployer/.rvm/rubies/ruby-2.0.0-p353/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/games
     - /usr/local/games

Any ideas ?

OWZY
  • 531
  • 7
  • 15
  • You are missing a system level dependency for one of your gems. What is the particular gem that this error surrounds? Is it `x` or is that a placeholder? – Damien Roche Dec 12 '13 at 23:54
  • i got the same error for nokogiri, eventmachine, json, http_parser, yajl-ruby – OWZY Dec 13 '13 at 00:00
  • I think these gems are dependencies of 'thin' and 'private_pub' – OWZY Dec 13 '13 at 00:06
  • 1
    If you search for "Failed to build gem native extension" and append each one of those gems you will find many posts on SO about the dependencies you're missing. For example, for nokogiri: http://stackoverflow.com/questions/16028028/nokogiri-will-not-install-error-failed-to-build-gem-native-extension – Damien Roche Dec 13 '13 at 02:40

0 Answers0