问题
I am newbie to ruby and rails for several months now.I took a class for ruby and rails which allowed me to create a restaurant blog site. Well I recently started revamping the site to make for my friend. So it's merely just changing some things around pictures, wording, etc. When I created the other blog completely I made a register to log in page which they need to create a log in in order to create and post a comment etc. Everything seems to work fine when I run rails s for the local host server but when I go to create a log in for the site to make sure everything is working correctly. It doesn't allow my to create a log in and I keep getting an error in my rails server. See below! I have searched and searched and can't seem to find a solution. The only thing I really changed around was a few pictures and some wording. I didn't mess around with the log in coding, create log in codes etc. Any help would be great in the mean time I will keep searching. Before this I was getting a content-length error so I followed this site http://theresa.multimediatechnology.at/webrick-warnings-in-ruby-1-9-3/. This seemed to fix that issue but now I get the below. Thanks!
whitey7@whitey7:~/poe$ rails s
=> Booting WEBrick
=> Rails 3.2.3 application starting in development on
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-07-28 08:59:58] INFO WEBrick 1.3.1
[2012-07-28 08:59:58] INFO ruby 1.9.3 (2012-04-20) [x86_64-linux]
[2012-07-28 08:59:58] INFO WEBrick::HTTPServer#start: pid=4690 port=3000
Started GET "/reviews/register" for 127.0.0.1 at 2012-07-28 09:00:04 -0400
Processing by ReviewsController#register as HTML
Rendered reviews/register.html.erb within layouts/application (5.9ms)
Completed 200 OK in 75ms (Views: 73.8ms | ActiveRecord: 0.0ms)
Started GET "/assets/reviews.css?body=1" for 127.0.0.1 at 2012-07-28 09:00:04 -0400
Served asset /reviews.css - 304 Not Modified (5ms)
Started GET "/assets/scaffolds.css?body=1" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /scaffolds.css - 304 Not Modified (2ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /jquery.js - 304 Not Modified (3ms)
Started GET "/assets/reviews.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /reviews.js - 304 Not Modified (1ms)
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /jquery_ujs.js - 304 Not Modified (2ms)
Started GET "/assets/images/images.jpeg" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /images/images.jpeg - 304 Not Modified (9ms)
Started GET "/assets/images/wisdom1.jpeg" for 127.0.0.1 at 2012-07-28 09:00:05 -0400
Served asset /images/wisdom1.jpeg - 304 Not Modified (4ms)
Started GET "/reviews/register" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Processing by ReviewsController#register as HTML
Rendered reviews/register.html.erb within layouts/application (1.2ms)
Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.0ms)
Started GET "/assets/reviews.css?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /reviews.css - 304 Not Modified (1ms)
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /jquery_ujs.js - 304 Not Modified (1ms)
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /jquery.js - 304 Not Modified (5ms)
Started GET "/assets/reviews.js?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /reviews.js - 304 Not Modified (0ms)
Started GET "/assets/scaffolds.css?body=1" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /scaffolds.css - 304 Not Modified (0ms)
Started GET "/assets/images/wisdom1.jpeg" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /images/wisdom1.jpeg - 304 Not Modified (3ms)
Started GET "/assets/images/images.jpeg" for 127.0.0.1 at 2012-07-28 09:00:24 -0400
Served asset /images/images.jpeg - 304 Not Modified (3ms)
^[[B
回答1:
The HTTP status code does not indicate an error. It simply means that the asset files (images, css, javascript) do not need to be transferred again as the browser already cached the most current version.
see HTTP 3xx status codes
来源:https://stackoverflow.com/questions/11701559/in-rails-3-2-3-server-i-get-error-304-not-modified-5ms