我对 Rails 3.2 有一个非常奇怪的问题。我对“app/assets/javascripts”所做的任何编辑都不会对我的应用产生任何影响。我什至从该目录中完全删除了所有文件,并且脚本(应该已经消失)继续像以前一样运行。
这是我从“app/assets/javascripts”中删除所有 js 文件后的服务器日志
Started GET "/article/4" for 127.0.0.1 at 2013-05-23 15:37:55 +0900
Processing by ArticleController#show as HTML
Parameters: {"id"=>"4"}
Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", "4"]]
VocabularyWord Load (0.2ms) SELECT "vocabulary_words".* FROM "vocabulary_words" WHERE "vocabulary_words"."article_id" = 4 ORDER BY word
CultureNote Load (0.1ms) SELECT "culture_notes".* FROM "culture_notes" WHERE "culture_notes"."article_id" = 4 ORDER BY title
Rendered article/show.html.erb within layouts/article (1.2ms)
Rendered layouts/_footer.html.erb (0.7ms)
Completed 200 OK in 15ms (Views: 11.9ms | ActiveRecord: 0.4ms)
Started GET "/assets/normalize-2.1.1.css?body=1" for 127.0.0.1 at 2013-05-23 15:37:55 +0900
Served asset /normalize-2.1.1.css - 304 Not Modified (0ms)
Started GET "/assets/sez_core.css?body=1" for 127.0.0.1 at 2013-05-23 15:37:55 +0900
Served asset /sez_core.css - 304 Not Modified (0ms)
Started GET "/assets/article.css?body=1" for 127.0.0.1 at 2013-05-23 15:37:55 +0900
Served asset /article.css - 304 Not Modified (0ms)
Started GET "/assets/Acknowledgement-webfont.woff" for 127.0.0.1 at 2013-05-23 15:37:55 +0900
Served asset /Acknowledgement-webfont.woff - 304 Not Modified (0ms)
如您所见,javascript 资产没有被提供,但它们继续在应用程序中运行。这是怎么回事???
我尝试清空浏览器缓存,但没有帮助。
还有一件事。当文件存在时,我想要编辑的 javascript 动画看起来像是在工作两次。当我完全删除它时,它似乎只动画一次。