gpt4 book ai didi

ruby-on-rails - 在 Rails 3.2.3 服务器中,我收到错误 304 Not Modified (5ms)

转载 作者:数据小太阳 更新时间:2023-10-29 08:33:24 24 4
gpt4 key购买 nike

我是 ruby​​ 和 rails 的新手已有几个月了。我参加了 ruby​​ 和 rails 的类(class),这使我能够创建一个餐厅博客网站。好吧,我最近开始改造网站,为我的 friend 制作。所以它只是改变一些关于图片、措辞等的东西。当我完全创建另一个博客时,我注册了一个登录页面,他们需要创建一个登录才能创建和发布评论等。一切似乎当我为本地主机服务器运行 rails 时工作正常,但是当我为站点创建登录以确保一切正常时。它不允许我创建登录,而且我的 Rails 服务器中不断出现错误。见下文!我搜索了又搜索,似乎找不到解决方案。我真正改变的唯一一件事是几张图片和一些措辞。我没有弄乱登录编码、创建登录代码等。在我继续搜索的同时,任何帮助都会很棒。在此之前,我遇到了内容长度错误,所以我关注了这个网站 http://theresa.multimediatechnology.at/webrick-warnings-in-ruby-1-9-3/ .这似乎解决了这个问题,但现在我得到了以下信息。谢谢!

 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 状态代码并不表示错误。它只是意味着 Assets 文件(图像、css、javascript)不需要再次传输,因为浏览器已经缓存了最新版本。

参见 HTTP 3xx status codes

关于ruby-on-rails - 在 Rails 3.2.3 服务器中,我收到错误 304 Not Modified (5ms),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11701559/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com