我的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>
我跑了一些耙子......我不记得究竟是什么,并认为这可能是原因。
答案 0 :(得分:0)
您的路线中有拼写错误,请更改:
recourses :sessions
为:
resources :sessions