【问题标题】:Bundle error when deploy with capistrano(rbenv)使用 capistrano(rbenv) 部署时出现捆绑错误
【发布时间】:2013-02-03 00:29:25
【问题描述】:

我使用 capistrano 将我的 rails 应用程序部署到我的 vps。我在cap deploy update 时遇到问题。

错误信息是这样的:

 ** [out :: 1] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
 ** [out :: 1] 
 ** [out :: 1] /usr/bin/ruby1.9.1 extconf.rb
 ** [out :: 1] 
 ** [out :: 1] 
 ** [out :: 1] Gem files will remain installed in /home/deployer/apps/get-real/shared/bundle/ruby/1.9.1/gems/raindrops-0.10.0 for inspection.
 ** [out :: 1] 
 ** [out :: 1] Results logged to /home/deployer/apps/get-real/shared/bundle/ruby/1.9.1/gems/raindrops-0.10.0/ext/raindrops/gem_make.out
 ** [out :: 1] 
 ** [out :: 1] An error occurred while installing raindrops (0.10.0), and Bundler cannot continue.
 ** [out :: 1] 
 ** [out :: 1] Make sure that `gem install raindrops -v '0.10.0'` succeeds before bundling.

我尝试在我的服务器上运行推荐 gem install raindrops -v '0.10.0',它成功了。但是当我再次运行cap deploy:update 时,它会失败并显示相同的错误消息。

我之前遇到过这个问题,我尝试了一些方法,它成功了。但是现在我忘记了我做了什么让它工作......

【问题讨论】:

  • 您的服务器的操作系统是什么?正如gem description 中所说,它依赖于 POSIX 共享内存,因此例如在我的 Win64 机器上构建本机扩展失败并显示checking for mmap() in sys/mman.h... no mmap() not found。其他原因可能是 PATH 中没有构建工具(make、gcc)。您确定您从您部署的同一用户成功运行gem install raindrops
  • @NIA 我使用 ubuntu 作为我的服务器操作系统。我确实使用同一个用户来运行gem install rainsdrops
  • “/home/deployer/apps/get-real/shared/bundle/ruby/1.9.1/gems/raindrops-0.10.0/ext/raindrops/gem_make.out”说什么?
  • @cthulhu just /usr/bin/ruby1.9.1 extconf.rb

标签: ruby-on-rails ruby nginx capistrano rbenv


【解决方案1】:

我解决了这个问题。

我刚刚去了/home/deployer/apps/get-real/shared/bundle/ruby/1.9.1/gems/并运行gem install raindrops -v '0.10.0'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-29
    • 2016-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多