管理平台2 Hostmonster的Apache的FCGI:Rails应用程序未能正确启动管理平台、应用程序、正确、Hostmonster

2023-09-02 20:34:28 作者:输过败过但不曾怕过

我跟安装说明直到配置部分对HostMonster的安装管理平台2。 当运行domain.com/redmine我总是500错误

I have followed install instructions until configuration section to install redmine 2 on hostmonster. When running domain.com/redmine I have always 500 error

Rails应用程序无法正常启动

Rails application failed to start properly

我还没有任何日志关于此错误的登录/ production.log 。以下是文件中:

I havent any log about this error in log/production.log. Here is the file:

OpenIdAuthentication.store为零。使用内存存储。   创建范围:开。覆盖现有方法Version.open。   创建范围:活跃。覆盖现有方法User.active。   DE preCATION警告:里面的ActiveSupport ::关注InstanceMethods模块将不再自动包括在内。请定义实例方法直接在CollectiveIdea ::行为:: NestedSet ::模型代替。 (来自所谓的包括/home1/iptechin/rails_apps/redmine200/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:58)   DE preCATION警告:里面的ActiveSupport ::关注InstanceMethods模块将不再自动包括在内。请定义实例方法直接在CollectiveIdea ::行为:: NestedSet ::模型代替。 (来自所谓的包括/home1/iptechin/rails_apps/redmine200/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:58)   创建范围:开。覆盖现有方法Issue.open。   迁移到安装程序(1)   迁移到IssueMove(2)   迁移到IssueAddNote(3)   迁移线...........................等.........   迁移到AddAuthSourcesFilter(20120301153455)   迁移到ChangeRepositoriesToFullSti(20120422150750)   OpenIdAuthentication.store为零。使用内存存储。   创建范围:开。覆盖现有方法Version.open。   创建范围:活跃。覆盖现有方法User.active。   DE preCATION警告:里面的ActiveSupport ::关注InstanceMethods模块将不再自动包括在内。请定义实例方法直接在CollectiveIdea ::行为:: NestedSet ::模型代替。 (来自所谓的包括/home1/iptechin/rails_apps/redmine200/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:58)   DE preCATION警告:里面的ActiveSupport ::关注InstanceMethods模块将不再自动包括在内。请定义实例方法直接在CollectiveIdea ::行为:: NestedSet ::模型代替。 (来自所谓的包括/home1/iptechin/rails_apps/redmine200/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:58)   创建范围:开。覆盖现有方法Issue.open。

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

My redmine should work with fcgi, so here is my public/.htaccess:

    AddHandler的FastCGI的脚本.fcgi         AddHandler的fcgid脚本.fcgi         AddHandler的CGI脚本cgi的      选项​​+ SymLinksIfOwnerMatch + ExecCGI

General Apache options

apache http server 2.2下载 Apache HTTP Server下载 V2.2.19

AddHandler fastcgi-script .fcgi AddHandler fcgid-script .fcgi AddHandler cgi-script .cgi Options +SymLinksIfOwnerMatch +ExecCGI

RewriteEngine叙述在

RewriteEngine On

重写规则^ $的index.html [QSA]   重写规则^([^。] +)$ $ 1.HTML [QSA]   的RewriteCond%{} REQUEST_FILENAME!-f      重写规则^()$ dispatch.fcgi [QSA,L]         重写规则^(。的)$ dispatch.fcgi [QSA,L]         重写规则^(。*)$ dispatch.cgi [QSA,L]   

RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.)$ dispatch.fcgi [QSA,L] RewriteRule ^(.)$ dispatch.fcgi [QSA,L] RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

的ErrorDocument 500

应用程序错误

Rails应用程序未能正确启动

ErrorDocument 500 "

Application error

Rails application failed to start properly"

和这里是我的公开/ dispatch.fcgi

要求File.dirname(文件)+'/../config/boot   需要File.dirname(文件)+'/../配置/环境

!/usr/bin/env ruby

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

类货架:: PathInfoRewriter     高清初始化(应用程序)       @app =应用程序     结束

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

高清通话(ENV)       env.delete('SCRIPT_NAME')       部分= ENV ['REQUEST_URI']。分割(?)       ENV ['PATH_INFO'] =零件[0]       ENV ['QUERY_STRING'] =部分 1 .to_s       @ app.call(ENV)     结束   结束

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

机架::处理器:: FastCGI.run架:: PathInfoRewriter.new(RedmineApp ::应用)

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

有任何错误配置?

推荐答案

这是一个宝石路的问题。 由于此no这样的文件加载 - 打捆/设置在Rails的3.2与我/public/.htaccess加入这一行乘客:

It was a gems path issue. Thanks to this no such file to load -- bundler/setup in Rails 3.2 with Passenger I added this line in /public/.htaccess:

SetEnv GEM_PATH /path-to-ruby-gems/ruby/gems