【问题标题】:Why does ffi not install on the remote server during a cap deploy?为什么在 cap 部署期间 ffi 没有安装在远程服务器上?
【发布时间】:2012-02-19 14:27:33
【问题描述】:

我正在尝试使用 capistrano 将我的 rails 应用程序部署到服务器,并在执行“cap deploy”后出现以下错误:

 ** [out :: ny.railshoster.de] /opt/ruby-e/bin/ruby extconf.rb
 ** [out :: ny.railshoster.de] checking for ffi.h... no
 ** [out :: ny.railshoster.de] checking for ffi.h in /usr/local/include... no
 ** [out :: ny.railshoster.de] checking for rb_thread_blocking_region()... yes
 ** [out :: ny.railshoster.de] checking for ruby_native_thread_p()... yes
 ** [out :: ny.railshoster.de] checking for rb_thread_call_with_gvl()... yes
 ** [out :: ny.railshoster.de] creating extconf.h
 ** [out :: ny.railshoster.de] creating Makefile
 ** [out :: ny.railshoster.de] 
 ** [out :: ny.railshoster.de] make
 ** [out :: ny.railshoster.de] Configuring libffi
 ** [out :: ny.railshoster.de] /home/{my_account}/rails1/shared/bundle/ruby/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/configure: line 2367: sleep: command not found
 ** [out :: ny.railshoster.de] /etc/magic, 0: Warning: using regular magic file `/usr/share/misc/magic'
 ** [out :: ny.railshoster.de] file: could not find any magic files!
 ** [out :: ny.railshoster.de] /home/{my_account}/rails1/shared/bundle/ruby/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/configure: line 7852: diff: command not found
 ** [out :: ny.railshoster.de] /home/{my_account}/rails1/shared/bundle/ruby/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/configure: line 9721: awk: command not found
 ** [out :: ny.railshoster.de] /home/{my_account}/rails1/shared/bundle/ruby/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/configure: line 9781: awk: command not found
 ** [out :: ny.railshoster.de] ./config.status: line 1274: awk: command not found
 ** [out :: ny.railshoster.de] config.status: error: could not create include/Makefile
 ** [out :: ny.railshoster.de] make: *** ["/home/{my_account}/rails1/shared/bundle/ruby/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi"/.libs/libffi_convenience.a] Error 1

我希望命令行输出的摘录是不言自明的,但如果有必要,我可以提供任何其他信息。 提前感谢您的帮助。

【问题讨论】:

    标签: ruby-on-rails ruby capistrano ffi


    【解决方案1】:

    您应该在远程服务器上安装 awk 和 diff 工具。也许您在远程服务器上的 $PATH 错误。

    【讨论】:

    • 是的,看起来路径设置不正确。看起来它找不到任何常用工具。我自己使用 rvm 并像这样设置 PATH:'PATH' => "..rvm_stuff..:$PATH" 如果你正在做类似的事情,我想要得到的是包含当前存在的 PATH var。跨度>
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多