与Rails应用程序客运Phusion的产卵错误 [英] passenger phusion spawning error with rails app

查看:246
本文介绍了与Rails应用程序客运Phusion的产卵错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行轨道上的Apache /乘客/ Ubuntu的4应用程序。该应用程序运行正常,当我在配置/环境/ production.rb注释掉config_serve.static.assets线,像这样的:

 #禁止导轨的静态资产服务器(Apache或NGINX会已经做到这一点)。
#config.serve_static_assets = FALSE

虽然它的工作原理,注释掉此行似乎是一个糟糕的主意,因为我读过的配置变量的默认值是真实的,它应该当你背后运行的应用程序被设置为false Apache或nginx的。然而,当我取消注释行,应用程序不启动,我得到了Apache的错误日志中出现以下错误:

  [客户端20]无法结帐会话,因为发生了产卵错误。错误的标识符是108162e2。请参阅前面日志中关于错误的详细信息。
应用10751标准输出:
应用10751标准错误: - >编译passenger_native_support.so当前的Ruby间preTER ...
应用10751标准错误:
应用10751标准错误:(套PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY = 0禁用)
应用10751标准错误:
应用10751标准错误: - >下载precompiled passenger_native_support.so当前的Ruby间preTER ...
应用10751标准错误:
应用10751标准错误:(套PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY = 0禁用)
应用10751标准错误:
应用10751标准错误:#焦油xzf ruby​​ext-红宝石2.1.3-x86_64的-linux.tar.gz
应用10751标准错误:#RM -f ruby​​ext-红宝石2.1.3-x86_64的-linux.tar.gz
应用10751标准错误:检查下载的二进制文件是否可用...
应用10751标准错误:#在/ usr / local / bin目录/红宝石-I。 test.rb
应用10751标准错误:/usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in`需要':libruby.so.2.1:无法打开共享对象文件:没有这样的文件或目录 - /tmp/passenger-native-support-j3v7kx/passenger_native_support.so(LoadError)
应用10751标准错误:从/usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in'要求'
应用10751标准错误:从test.rb:2:`<主>'
应用10751标准错误:二进制不可用。
应用10751标准错误: - >继续不passenger_native_support.so。
应用10751标准输出:
[2015年1月21日10:13:18.0841 10166 / 7fce0acf9700池2 / Implementation.cpp:287]:无法产卵申请的/ home / DFM流程:在启动时preloader出错。
  错误ID:4b40f65d
  错误详细信息保存到:/tmp/passenger-error-tH49HR.html
  从申请消息:#&LT未定义的局部变量或方法'假'; DFM ::应用:0x007f4afb293b30> (NameError)
  /home/DFM/config/environments/production.rb:24:in`块<顶(必填)>'
  /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.2.0.rc2/lib/rails/railtie.rb:210:in`instance_eval的
  /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.2.0.rc2/lib/rails/railtie.rb:210:in的configure
  /home/DFM/config/environments/production.rb:1:in`<顶(必填)>'

所以我的问题是:(1)它来运行注释掉配置变量的应用程序(因此默认设置为true)问题,以及(2)如果这是一个问题,如何解决它?


解决方案

  1. 这不是推荐,但它可能只是一个性能问题。

  2. 重要的错误信息存在隐患之中一堆乘客警告:

     从申请消息:#&LT未定义的局部变量或方法'假'; DFM ::应用:0x007f4afb293b30> (NameError)
    /home/DFM/config/environments/production.rb:24:in`块<顶(必填)>'


我敢肯定,你现在已经修正了这个,但谁遇到这个页面的将来客用户可能会分心,你和我是通过与乘客的原生支持在警告,这是不相关的错误本身。

I'm running a rails 4 app on apache/passenger/ubuntu. The app runs fine when I comment out the config_serve.static.assets line in config/environments/production.rb, like this:

# Disable Rails's static asset server (Apache or NGINX will already do this).
# config.serve_static_assets = false 

Although it works, commenting out this line seems to be a bad idea, as I've read that the default value of the config variable is true, and it's supposed to be set to false when you're running an app behind apache or nginx. However, when I uncomment the line, the app doesn't start and I get the following error in the apache error log:

[Client 20] Cannot checkout session because a spawning error occurred. The identifier of the error is 108162e2. Please see earlier logs for details about the error.
App 10751 stdout:
App 10751 stderr:  --> Compiling passenger_native_support.so for the current Ruby interpreter...
App 10751 stderr:
App 10751 stderr:      (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 10751 stderr:
App 10751 stderr:  --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
App 10751 stderr:
App 10751 stderr:      (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
App 10751 stderr:
App 10751 stderr:      # tar xzf rubyext-ruby-2.1.3-x86_64-linux.tar.gz
App 10751 stderr:      # rm -f rubyext-ruby-2.1.3-x86_64-linux.tar.gz
App 10751 stderr:      Checking whether downloaded binary is usable...
App 10751 stderr:      # /usr/local/bin/ruby -I. test.rb
App 10751 stderr:      /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': libruby.so.2.1: cannot open shared object file: No such file or directory - /tmp/passenger-native-support-j3v7kx/passenger_native_support.so (LoadError)
App 10751 stderr:       from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
App 10751 stderr:       from test.rb:2:in `<main>'
App 10751 stderr:      Binary is not usable.
App 10751 stderr:  --> Continuing without passenger_native_support.so.
App 10751 stdout:
[ 2015-01-21 10:13:18.0841 10166/7fce0acf9700 Pool2/Implementation.cpp:287 ]: Could not spawn process for application /home/DFM: An error occured while starting up the preloader.
  Error ID: 4b40f65d
  Error details saved to: /tmp/passenger-error-tH49HR.html
  Message from application: undefined local variable or method `false ' for #<Dfm::Application:0x007f4afb293b30> (NameError)
  /home/DFM/config/environments/production.rb:24:in `block in <top (required)>'
  /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.2.0.rc2/lib/rails/railtie.rb:210:in `instance_eval'
  /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.2.0.rc2/lib/rails/railtie.rb:210:in `configure'
  /home/DFM/config/environments/production.rb:1:in `<top (required)>'

So my questions are (1) is it a problem to run the app with the config variable commented out (and therefore defaulting to true), and (2) if it is a problem, how to fix it?

解决方案

  1. It's not recommended but it's probably only a performance problem.
  2. The important error message there is hidden amongst a bunch of Passenger warnings:

    Message from application: undefined local variable or method `false ' for #<Dfm::Application:0x007f4afb293b30> (NameError)
    /home/DFM/config/environments/production.rb:24:in `block in <top (required)>'
    

I'm sure you've fixed this by now, but future Passenger users who come across this page might be distracted as you and I were by the warnings relating to Passenger Native Support, which are not relevant to the error itself.

这篇关于与Rails应用程序客运Phusion的产卵错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆