[英]trouble with running ruby on rails app
I trying to run for app on server and log file give me an error 我试图在服务器和日志文件上运行应用程序,但出现错误
You may have mistyped the address or the page may have moved.
and in log file 并在日志文件中
[2014-03-12T09:50:22.614788 #1647] INFO -- : Started GET "/" for 84.38.185.44 at 2014-03-12 09:50:22 +0000 F, [2014-03-12T09:50:22.771502 #1647] FATAL -- : ActionController::RoutingError (No route matches [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
block in call' 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
[2014-03-12T09:50:22.614788#1647] INFO-:在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
call' actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in
通话中的栏杆(4.0.2)lib / rails / rack / logger.rb:38:在call_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
标记状态' activesupport(4.0.2)lib / active_support / tagged_logging.rb:67:在tagged' railties (4.0.2) lib/rails/rack/logger.rb:20:in
通话中的动作包(4.0.2)lib / action_dispatch / middleware / request_id.rb:21:call' rack (1.5.2) lib/rack/methodoverride.rb:21:in
通话中机架(1.5.2)lib / rack / runtime.rb:17:call' activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in
call' 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
'call' activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in
通话中机架(1.5.2)lib / rack / sendfile.rb:112:call' railties (4.0.2) lib/rails/engine.rb:511:in
通话中'railties(4.0.2)lib / rails / application.rb:97:call' unicorn (4.7.0) lib/unicorn/http_server.rb:580:in
process_client中unicorn(4.7.0)lib / unicorn / http_server .rb:660:在worker_loop' unicorn (4.7.0) lib/unicorn/http_server.rb:527:in
spawn_missing_workers的独角兽(4.7.0)lib / unicorn / http_server.rb:153:在start' 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中load' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn:23:in
eval' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in
'
that can i do with it? 那我可以做吗?
Seems that the root route is not defined. 似乎未定义根路由。 Open your route.rb ad check if there's something like this:
打开您的route.rb广告,检查是否存在以下情况:
root :to => "controller#index"
Could you try to add the following line ( posts
for example)? 您可以尝试添加以下行(例如
posts
)吗?
# config/routes.rb
root to: 'posts#index'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.