2012-05-24 1 views
2

구성 섹션까지 따라 hostmonster에 redmine 2를 설치했습니다. domain.com/redmine을 실행할 때 는 항상 500 오류가 나는 로그/production.log이 오류에 대한 로그를 haventHostmonster apache fcgi의 Redmine 2 : Rails 응용 프로그램이 제대로 시작되지 못했습니다.

Rails application failed to start properly 

에게 있습니다. 여기에 파일입니다

OpenIdAuthentication.store is nil. Using in-memory store. 
Creating scope :open. Overwriting existing method Version.open. 
Creating scope :active. Overwriting existing method User.active. 
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in CollectiveIdea::Acts::NestedSet::Model instead. (called from include at /home1/iptechin/rails_apps/redmine200/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:58) 
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in CollectiveIdea::Acts::NestedSet::Model instead. (called from include at /home1/iptechin/rails_apps/redmine200/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:58) 
Creating scope :open. Overwriting existing method Issue.open. 
Migrating to Setup (1) 
Migrating to IssueMove (2) 
Migrating to IssueAddNote (3) 
Migration lines...........................etc......... 
Migrating to AddAuthSourcesFilter (20120301153455) 
Migrating to ChangeRepositoriesToFullSti (20120422150750) 
OpenIdAuthentication.store is nil. Using in-memory store. 
Creating scope :open. Overwriting existing method Version.open. 
Creating scope :active. Overwriting existing method User.active. 
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in CollectiveIdea::Acts::NestedSet::Model instead. (called from include at /home1/iptechin/rails_apps/redmine200/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:58) 
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in CollectiveIdea::Acts::NestedSet::Model instead. (called from include at /home1/iptechin/rails_apps/redmine200/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:58) 
Creating scope :open. Overwriting existing method Issue.open. 

내 레드 마인이있는 fcgi와 함께 작동합니다 그래서 여기, 내 공공/htaccess로 : 여기

# General Apache options 
<IfModule mod_fastcgi.c> 
    AddHandler fastcgi-script .fcgi 
</IfModule> 
<IfModule mod_fcgid.c> 
AddHandler fcgid-script .fcgi 
</IfModule> 
<IfModule mod_cgi.c> 
AddHandler cgi-script .cgi 
</IfModule> 
Options +SymLinksIfOwnerMatch +ExecCGI 

RewriteEngine On 

RewriteRule ^$ index.html [QSA] 
RewriteRule ^([^.]+)$ $1.html [QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
<IfModule mod_fastcgi.c> 
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] 
</IfModule> 
<IfModule mod_fcgid.c> 
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] 
</IfModule> 
<IfModule mod_cgi.c> 
RewriteRule ^(.*)$ dispatch.cgi [QSA,L] 
</IfModule> 

ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" 

을 그리고 내 공공/dispatch.fcgi입니다 :

#!/usr/bin/env ruby 

require File.dirname(__FILE__) + '/../config/boot' 
require File.dirname(__FILE__) + '/../config/environment' 

class Rack::PathInfoRewriter 
    def initialize(app) 
    @app = app 
    end 

    def call(env) 
    env.delete('SCRIPT_NAME') 
    parts = env['REQUEST_URI'].split('?') 
    env['PATH_INFO'] = parts[0] 
    env['QUERY_STRING'] = parts[1].to_s 
    @app.call(env) 
    end 
end 

Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(RedmineApp::Application) 

어떤 잘못이 있습니까?

답변

1

모든 올바른 보석이 설치됩니다?

# General Apache options 
<IfModule mod_fastcgi.c> 
    AddHandler fastcgi-script .fcgi 
</IfModule> 
<IfModule mod_fcgid.c> 
# AddHandler fcgid-script .fcgi 
</IfModule> 
<IfModule mod_cgi.c> 
# AddHandler cgi-script .cgi 
</IfModule> 
# For security reasons, Option followsymlinks cannot be overridden. 
#Options +FollowSymLinks +ExecCGI 
Options +SymLinksIfOwnerMatch +ExecCGI 

# If you don't want Rails to look in certain directories, 
# use the following rewrite rules so that Apache won't rewrite certain requests 
# 
# Example: 
# RewriteCond %{REQUEST_URI} ^/notrails.* 
# RewriteRule .* - [L] 

# Redirect all requests not available on the filesystem to Rails 
# By default the cgi dispatcher is used which is very slow 
# 
# For better performance replace the dispatcher with the fastcgi one 
# 
# Example: 
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] 
RewriteEngine On 

# If your Rails application is accessed via an Alias directive, 
# then you MUST also set the RewriteBase in this htaccess file. 
# 
# Example: 
# Alias /myrailsapp /path/to/myrailsapp/public 
# RewriteBase /myrailsapp 

Options -MultiViews 
PassengerResolveSymlinksInDocumentRoot on 
#Change to your environment 
RailsEnv production 

RewriteBase/
RewriteRule ^$ index.html [QSA] 
RewriteRule ^([^.]+)$ $1.html [QSA] 
RewriteCond %{REQUEST_FILENAME} !-f 
<IfModule mod_fastcgi.c> 
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] 
</IfModule> 
<IfModule mod_fcgid.c> 
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] 
</IfModule> 
<IfModule mod_cgi.c> 
    RewriteRule ^(.*)$ dispatch.cgi [QSA,L] 
</IfModule> 

# In case Rails experiences terminal errors 
# Instead of displaying this message you can supply a file here which will be rendered instead 
# 
# Example: 
# ErrorDocument 500 /500.html 

ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" 
#RewriteCond %{HTTP_HOST} ^redmine.acme-tech.net$ [OR] 
#RewriteCond %{HTTP_HOST} ^www.redmine.acme-tech.net$ 
#RewriteRule ^(.*)$ "http\:\/\/127\.0\.0\.1\:12018\/$1" [P,L] 

그것이

GJ 도움이되기를 바랍니다

#!/usr/bin/ruby 
    # 
    # You may specify the path to the FastCGI crash log (a log of unhandled 
    # exceptions which forced the FastCGI instance to exit, great for debugging) 
    # and the number of requests to process before running garbage collection. 
    # 
    # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log 
    # and the GC period is nil (turned off). A reasonable number of requests 
    # could range from 10-100 depending on the memory footprint of your app. 
    # 
    # Example: 
    # # Default log path, normal GC behavior. 
    # RailsFCGIHandler.process! 
    # 
    # # Default log path, 50 requests between GC. 
    # RailsFCGIHandler.process! nil, 50 
    # 
    # # Custom log path, normal GC behavior. 
    # RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log' 
    # 
    require File.dirname(__FILE__) + "/../config/environment" 
    require 'fcgi_handler' 

    RailsFCGIHandler.process! 

내 htaccess로 :

여기 내 dispatch.fcgi입니다.

+0

감사하지만 지금은 승객 오류를해야합니까! 나는 여객이 Hostmonster에서 이용할 수 없다고 생각한다. 그렇지? – addex03

+0

그것은 분명하지 않다 : http://railsforum.com/viewtopic.php?id=41623 - http://railsforum.com/viewtopic.php?id=39146 –

+0

@Gjergj Shelija의 고마워요! 당신은 방금 내 머리에 많은 머리카락을 저장, 내 서버에 redmine 설정과 함께 포기하고 로컬 버전과 함께하지만 당신 덕분에 일하고 있어요 :) –

관련 문제