我试图在服务器和日志文件上运行app给我一个错误
You may have mistyped the address or the page may have moved.
并在日志文件中
[2014-03-12T09:50:22.614788#1647]信息 - :开始获取“/” 84.38.185.44于2014-03-12 09:50:22 +0000 F,[2014-03-12T09:50:22.771502#1647]致命 - : ActionController :: RoutingError(没有路由匹配[GET]“/”): actionpack(4.0.2)lib / action_dispatch / middleware / debug_exceptions.rb:21:in
call' actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call' railties(4.0.2)lib / rails / rack / logger.rb:38:incall_app' railties (4.0.2) lib/rails/rack/logger.rb:20:in
阻止通话' activesupport(4.0.2)lib / active_support / tagged_logging.rb:67:inblock in tagged' activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in
tagged' activesupport(4.0.2)lib / active_support / tagged_logging.rb:67:intagged' railties (4.0.2) lib/rails/rack/logger.rb:20:in
call' actionpack(4.0.2)lib / action_dispatch / middleware / request_id.rb:21:incall' rack (1.5.2) lib/rack/methodoverride.rb:21:in
call' rack(1.5.2)lib / rack / runtime.rb:17:incall' activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in
call' rack(1.5.2)lib / rack / sendfile.rb:112:incall' railties (4.0.2) lib/rails/engine.rb:511:in
call' railties(4.0.2)lib / rails / application.rb:97:incall' unicorn (4.7.0) lib/unicorn/http_server.rb:580:in
process_client' unicorn(4.7.0)lib / unicorn / http_server.rb:660:inworker_loop' unicorn (4.7.0) lib/unicorn/http_server.rb:527:in
spawn_missing_workers' unicorn(4.7.0)lib / unicorn / http_server.rb:153:instart' unicorn (4.7.0) bin/unicorn:126:in
' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn:23:inload' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn:23:in
' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:ineval' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in
“
我可以用它吗?
答案 0 :(得分:2)
似乎未定义根路由。打开你的route.rb广告,检查是否有类似这样的内容:
root :to => "controller#index"