我刚刚开始使用 Ruby on Rails,我正在通过一个教程开始。我已准备好进行测试的所有内容,因此我可以使用rails server
目录中的命令使其显示我想查看的基本“欢迎登机”页面;但是,当我将其更改为时,rails server -e production
我突然只看到“您要查找的页面不存在”。页。发生这种情况时,命令提示符显示:
[2013-08-07 19:54:26] INFO WEBrick 1.3.1
[2013-08-07 19:54:26] INFO ruby 1.9.3 (2013-06-27) [i386-mingw32]
[2013-08-07 19:54:26] INFO WEBrick::HTTPServer#start: pid=12664 port=3000
I, [2013-08-07T19:54:26.515238 #12664] INFO -- : Started GET "/" for 127.0.0.1
at 2013-08-07 19:54:26 -0700
F, [2013-08-07T19:54:26.752394 #12664] FATAL -- :
ActionController::RoutingError (No route matches [GET] "/"):
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `c
all'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `ca
ll'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tag
ged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `
call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
C:/Ruby193/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
C:/Ruby193/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
C:/Ruby193/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
这似乎与许多其他问题非常相似,但我尝试了许多都失败的解决方案。感谢您提供任何可能的帮助。