无法在生产服务器上捆绑安装一些宝石

时间:2013-12-12 23:16:01

标签: ruby-on-rails ruby rubygems bundler digital-ocean

我发现在生产服务器上捆绑安装一些宝石有点麻烦,比如nokogiri,eventmachine,json,http_parser.rb,yajl-ruby。 我使用capistrano来部署应用程序,

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.

如果我尝试通过服务器安装丢失的gem,它可以工作,捆绑安装停止要求它:

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

这是我的宝石环境:

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

有什么想法吗?

0 个答案:

没有答案