在Rails 3.2.3服务器中,我得到错误304 Not Modified(5ms) [英] In Rails 3.2.3 server I get error 304 Not Modified (5ms)

查看:94
本文介绍了在Rails 3.2.3服务器中,我得到错误304 Not Modified(5ms)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是红宝石和铁轨的新手,已经有几个月了.我上了红宝石和铁轨的课程,这使我得以创建一个餐厅博客网站.好吧,我最近开始改版该网站,以供我的朋友使用.因此,这仅仅是改变图片,文字等方面的一些内容.当我完全创建另一个博客时,我做了一个登录页面的注册,他们需要创建一个登录页面才能创建和发布评论等.一切似乎都在当我为本地主机服务器运行rails时,工作正常,但是当我去创建该站点的登录以确保一切正常时,我可以正常工作.它不允许我创建登录,并且在Rails服务器中不断出现错误.见下文!我已经搜索了,似乎找不到解决方案.我真正改变的唯一一件事是几张图片和一些措辞.我并没有搞乱登录代码,创建登录代码等.在我继续搜索的同时,任何帮助都将是非常有用的.在此之前,我遇到了内容长度错误,因此我关注了该网站 http://theresa.multimediatechnology.at/webrick-warnings-in-ruby-1-9-3/.这似乎可以解决该问题,但是现在我得到了.谢谢!

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

推荐答案

HTTP状态代码未指示错误.这只是意味着资产文件(图像,CSS,JavaScript)无需再次传输,因为浏览器已经缓存了最新版本.

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.

请参见 HTTP 3xx状态代码

这篇关于在Rails 3.2.3服务器中,我得到错误304 Not Modified(5ms)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆