有一些类似的问题,但没有明确的解决方案,我无法解决问题。
当它开始尝试访问我的样式表时,错误似乎就开始了。我最近对应用程序做的唯一奇怪的事情是将图像放在公共文件夹中,因为它无法在资产管道中访问它们。然而,样式表工作了大约一天。然后一切都崩溃了。这是启动rails服务器时的日志:
$ rails server
=> Booting WEBrick
=> Rails 4.0.1 application starting in development on localhost
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2014-01-08 19:55:25] INFO WEBrick 1.3.1
[2014-01-08 19:55:25] INFO ruby 2.0.0 (2013-05-14) [i386-mingw32]
[2014-01-08 19:55:25] INFO WEBrick::HTTPServer#start: pid=12384 port=3000
Started GET "/" for 127.0.0.1 at 2014-01-08 19:55:31 -0800
ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM
"schema_migrations"
Processing by PagesController#home as HTML
Rendered layouts/_recent.html.erb (1.0ms)
Rendered pages/home.html.erb within layouts/application (8.0ms)
Rendered layouts/_header.html.erb (12.0ms)
Completed 200 OK in 74ms (Views: 49.0ms | ActiveRecord: 0.0ms)
Started GET "/stylesheets/application.css" for 127.0.0.1 at 2014-01-08 19:55:31
-0800
ActionController::RoutingError (No route matches [GET] "/stylesheets/application
.css"):
actionpack (4.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `c
all'
actionpack (4.0.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `ca
ll'
railties (4.0.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.1) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.0.1) lib/active_support/tagged_logging.rb:67:in `block in tag
ged'
activesupport (4.0.1) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.1) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.1) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.0.1) 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.1) lib/active_support/cache/strategy/local_cache.rb:83:in `
call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.1) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.0.1) lib/rails/engine.rb:511:in `call'
railties (4.0.1) 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:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `servi
ce'
c:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
c:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in
start_thread'
Rendered c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/actionpack-4.0.1
/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.0ms)
Rendered c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/actionpack-4.0.1
/lib/action_dispatch/middleware/templates/routes/_route.html.erb (2.0ms)
Rendered c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/actionpack-4.0.1
/lib/action_dispatch/middleware/templates/routes/_table.html.erb (8.0ms)
Rendered c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/actionpack-4.0.1
/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescu
es/layout (74.0ms)
Started GET "/javascripts/application.js" for 127.0.0.1 at 2014-01-08 19:55:31 -
0800
ActionController::RoutingError (No route matches [GET] "/javascripts/application
.js"):
actionpack (4.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `c
all'
actionpack (4.0.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `ca
ll'
railties (4.0.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.1) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.0.1) lib/active_support/tagged_logging.rb:67:in `block in tag
ged'
activesupport (4.0.1) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.1) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.1) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.0.1) 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.1) lib/active_support/cache/strategy/local_cache.rb:83:in `
call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.1) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.0.1) lib/rails/engine.rb:511:in `call'
railties (4.0.1) 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:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `servi
ce'
c:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
c:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in
start_thread'
Rendered c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/actionpack-4.0.1
/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
Rendered c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/actionpack-4.0.1
/lib/action_dispatch/middleware/templates/routes/_route.html.erb (3.0ms)
Rendered c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/actionpack-4.0.1
/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.0ms)
Rendered c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/actionpack-4.0.1
/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescu
es/layout (70.0ms)