2013-10-31 139 views
0

我的Rails服務器工作正常,但現在突然它說,在CMD中,它不會啓動。我無法連接到本地主機:3000.任何想法,爲什麼發生這種情況?我的Rails服務器沒有運行

C:\Users\Monika\College\Mary\RailsProject\reviewapp>rails s 
    => Booting WEBrick 
    => Rails 3.2.1 application starting in development on http://0.0.0.0:3000 
    => Call with -d to detach 
    => Ctrl-C to shutdown server 
      SECURITY WARNING: No secret option provided to Rack::Session::Cookie. 
      This poses a security threat. It is strongly recommended that you 
      provide a secret to prevent exploits that may be possible from crafted 
      cookies. This will not be supported in future versions of Rack, and 
      future versions will even invalidate your existing user cookies. 

      Called from: C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/action 
    pack-3.2.1/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initi 
    alize'. 

    Exiting 
    C:/Users/Monika/College/Mary/RailsProject/reviewapp/config/routes.rb:18:in `bloc 
    k in <top (required)>': undefined method `recourses' for #<ActionDispatch::Routi 
    ng::Mapper:0x47577a8> (NoMethodError) 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.2 
    .1/lib/action_dispatch/routing/route_set.rb:272:in `instance_exec' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.2 
    .1/lib/action_dispatch/routing/route_set.rb:272:in `eval_block' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.2 
    .1/lib/action_dispatch/routing/route_set.rb:249:in `draw' 
      from C:/Users/Monika/College/Mary/RailsProject/reviewapp/config/routes.r 
    b:1:in `<top (required)>' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport- 
    3.2.1/lib/active_support/dependencies.rb:245:in `load' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport- 
    3.2.1/lib/active_support/dependencies.rb:245:in `block in load' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport- 
    3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport- 
    3.2.1/lib/active_support/dependencies.rb:245:in `load' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/application/routes_reloader.rb:40:in `block in load_paths' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/application/routes_reloader.rb:40:in `each' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/application/routes_reloader.rb:40:in `load_paths' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/application/routes_reloader.rb:16:in `reload!' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/application/routes_reloader.rb:26:in `block in updater' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport- 
    3.2.1/lib/active_support/file_update_checker.rb:78:in `call' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport- 
    3.2.1/lib/active_support/file_update_checker.rb:78:in `execute' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/application/routes_reloader.rb:27:in `updater' 
      from C:2:in `rescue in execute_if_updated' 
      from C:in `execute_if_updated' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/application/finisher.rb:66:in `block in <module:Finisher>' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/initializable.rb:30:in `instance_exec' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/initializable.rb:30:in `run' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/initializable.rb:55:in `block in run_initializers' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/initializable.rb:54:in `each' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/initializable.rb:54:in `run_initializers' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/application.rb:136:in `initialize!' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/railtie/configurable.rb:30:in `method_missing' 
      from C:/Users/Monika/College/Mary/RailsProject/reviewapp/config/environm 
    ent.rb:5:in `<top (required)>' 
      from C:/Users/Monika/College/Mary/RailsProject/reviewapp/config.ru:3:in 
    `require' 
      from C:/Users/Monika/College/Mary/RailsProject/reviewapp/config.ru:3:in 
    `block in <main>' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib 
    /rack/builder.rb:51:in `instance_eval' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib 
    /rack/builder.rb:51:in `initialize' 
      from C:/Users/Monika/College/Mary/RailsProject/reviewapp/config.ru:in `n 
    ew' 
      from C:/Users/Monika/College/Mary/RailsProject/reviewapp/config.ru:in `< 
    main>' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib 
    /rack/builder.rb:40:in `eval' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib 
    /rack/builder.rb:40:in `parse_file' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib 
    /rack/server.rb:200:in `app' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1z 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib 
    /rack/server.rb:304:in `wrapped_app' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib 
    /rack/server.rb:254:in `start' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/commands/server.rb:70:in `start' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/commands.rb:55:in `block in <top (required)>' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/commands.rb:50:in `tap' 
      from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1 
    /lib/rails/commands.rb:50:in `<top (required)>' 
      from script/rails:6:in `require' 
      from script/rails:6:in `<main> 

我跑了某種耙子......我不記得究竟是什麼,並認爲這可能是原因。

+0

什麼的'''reviewapp /配置/ routes.rb'''文件是什麼樣子? – mechanicalfish

+0

Reviewapp :: Application.routes.draw做 GET 「節/新」 獲得 「會話/創建」 獲得 「會話/消滅」 GET 「頁/關於」 資源:評論 資源:產品 資源:客戶 資源:類 追索權:會議 \t匹配 '/登入':以=> '會話#新' \t匹配「/ signout ',:to =>'sessions#destroy' – user2897724

+0

對不起,我不能回答我的問題,因爲我沒有更高的聲譽,所以我不能發佈更好的佈局... – user2897724

回答

0

您的路線一個錯字,變化:

recourses :sessions 

到:

resources :sessions 
+0

我盯着那麼久,不能相信我沒有看到它......但不幸的是,它仍然不讓我連接到服務器後,我運行rails s = [ – user2897724

+0

什麼是新的錯誤? – mechanicalfish

+0

我修正了這是一個語法錯誤。非常感謝。我不認爲這是那麼簡單......我覺得有點愚蠢,但我只是在學習,我很抱歉。謝謝 – user2897724