chsboy
2010-06-08 08:28
浏览 371
已采纳

rails应用在webrick下可以跑起来,在lighttpd下报no route的错?

development.log报错如下:[code="java"]
ActionController::RoutingError (No route matches "/say/hello" with {:method=>:get}):
/vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb:67:in recognize_path'
/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:384:in
recognize'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:148:in handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in
dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in synchronize'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in
dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in
dispatch'
/vendor/rails/railties/lib/fcgi_handler.rb:103:in process_request'
/vendor/rails/railties/lib/fcgi_handler.rb:153:in
with_signal_handler'
/vendor/rails/railties/lib/fcgi_handler.rb:101:in process_request'
/vendor/rails/railties/lib/fcgi_handler.rb:78:in
process_each_request'
/usr/local/lib/site_ruby/1.8/fcgi.rb:612:in each_cgi'
/usr/local/lib/site_ruby/1.8/fcgi.rb:609:in
each'
/usr/local/lib/site_ruby/1.8/fcgi.rb:609:in each_cgi'
/vendor/rails/railties/lib/fcgi_handler.rb:77:in
process_each_request'
/vendor/rails/railties/lib/fcgi_handler.rb:76:in catch'
/vendor/rails/railties/lib/fcgi_handler.rb:76:in
process_each_request'
/vendor/rails/railties/lib/fcgi_handler.rb:50:in process!'
/vendor/rails/railties/lib/fcgi_handler.rb:24:in
process!'
/public/dispatch.fcgi:26

Rendering /home/cmaster/web/emporium/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb (not_found)

[/code]

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

4条回答 默认 最新

  • myali88 2010-06-10 12:41
    已采纳

    看看lighttpd启动的日志error.log

    已采纳该答案
    评论
    解决 无用
    打赏 举报
  • myali88 2010-06-08 08:38

    运行环境如何,怎么配置的?

    评论
    解决 无用
    打赏 举报
  • myali88 2010-06-08 10:04

    [quote]顺便问一下lighttpd下可以配多个web应用吗? [/quote]
    当然可以,你的ruby和rails版本呢?

    评论
    解决 无用
    打赏 举报
  • myali88 2010-06-08 13:51

    就是配置多个虚拟主机就可以了。
    [code="java"]
    $HTTP["host"] =~ "www.domain.com$" {
    server.document-root = "/var/www/domain.com/"
    server.name = "www.domain.com"
    }

    $HTTP["host"] =~ "www.domain2.com$" {
    server.document-root = "/var/www/domain2.com"
    server.name = "domain2.com"

    server.error-handler-404="/index.php"

    }
    [/code]

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题