2015-01-21 3 views
0

아파치/승객/우분투에서 레일 4 앱을 실행 중입니다. 레일 API로 승객 퓨전 산란 오류가 발생했습니다.

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

가 작동하지만

,이 라인을 주석하는 것은 같은 나쁜 생각 것 같다 :이 같은 설정/환경/production.rb에 config_serve.static.assets 라인을 주석 처리 할 때 응용 프로그램은 잘 실행 config 변수의 기본값은 true이고 appache 또는 nginx 뒤에있는 앱을 실행할 때 false로 설정되어 있다고 읽었습니다. 내가 행의 주석을 해제 그러나, 응용 프로그램이 시작되지 않고 나는 아파치 오류 로그에 다음과 같은 오류 얻을 :

[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)>' 

을 그래서 내 질문 (1)가 함께 응용 프로그램을 실행하는 데 문제가 있습니다 config 변수를 주석 처리하고 (따라서 기본값을 true로 설정), (2) 문제가 있다면 수정하는 방법?

답변

1
  1. 성능 문제 일 가능성이 있습니다.
  2. 중요한 오류 메시지가 여객 경고 한 무리의 사이가 숨겨져 :

    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)>' 
    

난 당신이 지금이 문제를 해결했는지 확인 해요,하지만이 페이지 건너 미래 여객 사용자 수도 너와 나는 오류 자체와 관련이없는 승객 원주민 지원에 관한 경고로 경고를 받았다.

관련 문제