【发布时间】: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