为什么Rails 4.2.1在生产中寻找index.html(apache2,passenger)

问题描述 投票:1回答:0

我已经在生产环境中部署了以下软件堆栈:Rails 4.2.1 Apache 2 Passenger 5.0.13

通过浏览器请求应用程序时,这是production.log上的错误:

[2015-07-12T17:22:23.089940#5378]信息-:在2015-07-12 17:22:23 +0000 F,[2015-07-12T17]为10.0.0.89开始GET“ /index.html” :22:23.090858#5378]致命-:ActionController :: RoutingError(没有路由与[GET]“ /index.html”匹配):actionpack(4.2.1)lib / action_dispatch / middleware / debug_exceptions.rb:21:in call'
actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call'
actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call'
actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call'
railties(4.2.1)lib / rails / rack / logger.rb:38:在call_app' railties (4.2.1) lib/rails/rack/logger.rb:20:in在call'activesupport中(4.2.1) lib / active_support / tagged_logging.rb:68: block in tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in
block in tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in
block in tagged'
activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in
标签中'activesupport(4.2.1)lib / active_support / tagged_logging.rb:68:在tagged' railties (4.2.1) lib/rails/rack/logger.rb:20:in通话中动作包(4.2.1)lib / action_dispatch / middleware / request_id.rb:21: call' rack (1.6.4) lib/rack/methodoverride.rb:22:in通话中机架(1.6.4)lib / rack / runtime.rb:18: call' activesupport (4.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in调用中的机架(1.6.4)lib / rack /sendfile.rb:113: call' railties (4.2.1) lib/rails/engine.rb:518:in调用中的Railties(4.2.1)lib / rails / application.rb:164: call'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/rack/thread_handler_extension.rb:94:in
call'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/rack/thread_handler_extension.rb:94:in
call'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/rack/thread_handler_extension.rb:94:in
process_request'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/request_handler/thread_handler.rb:149:in accept_and_process_next_request'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/request_handler/thread_handler.rb:110:in
accept_and_process_next_request'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/request_handler/thread_handler.rb:110:in
accept_and_process_next_request'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/request_handler/thread_handler.rb:110:in
main_loop'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/request_handler.rb:415: block (3 levels) in start_threads'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/utils.rb:111:in
block (3 levels) in start_threads'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/utils.rb:111:in
block (3 levels) in start_threads'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/utils.rb:111:in
在create_thread_and_abort_on_exception中的block (3 levels) in start_threads'
/home/ubuntu/.rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.13/lib/phusion_passenger/utils.rb:111:in
块中

我的config / routes.rb如下:

Rails.application.routes.draw do
   root 'sessions#new'
   # - Session Resources - #
   resources :sessions, only: [:new, :create, :destroy]
   resources :password_resets
end

在开发过程中,根页面得到相应的服务,但在生产中,出现上述错误的空白屏幕。

请协助。

ruby-on-rails ruby ubuntu passenger apache2.2
© www.soinside.com 2019 - 2024. All rights reserved.