0

私のRailsサーバーは正常に動作していましたが、突然、cmdでそれが表示され、起動しません。localhost:3000 に接続できません。なぜこれが起こっているのか?

 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>

ある種のレーキを走らせました...それが正確に何であったか覚えていませんが、それが原因かもしれないと思います。

4

1 に答える 1

0

ルートにタイプミスがあります。変更してください:

recourses :sessions

に:

resources :sessions
于 2013-11-01T00:29:54.933 に答える