找到问题所在了,原来是在 scaffolds.css.scss 中也定义了 body 的背景,删掉就行了。
谢谢大家
#1 楼 @sunzheng91 谢谢,那关于 HTML/CSS/JavaScript 有没有什么好的书
#3 楼 @Rei 现在是配合着http://pragprog.com/wikis/wiki/ChangesInRails30看第三版的书有哪些改变
#1 楼 @Rei 那如果想要用最新版的话要怎样做?看日志记录如下: Started GET "/assets/defults.js" for 127.0.0.1 at 2012-03-23 16:12:42 +0800 Served asset /defults.js - 404 Not Found (6ms)
Started POST "/store/add_to_cart/3" for 127.0.0.1 at 2012-03-23 16:13:54 +0800 Processing by StoreController#add_to_cart as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"FBcnJUZRZ+cfxywPNWvQEjPUhh7XMfxQTaHlk6mW08M=", "commit"=>"Add to Cart", "id"=>"3"} [1m[35mProduct Load (0.0ms)[0m SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "3"]] Completed 406 Not Acceptable in 6ms (ActiveRecord: 0.0ms)
感谢各位,问题得到解决。
#encoding: GBK
a = File.open("word.txt") #通过另存为知道文件是UTF-8编码
a.each do |line|
line.split(' ').each do |word|
#do something
end
end
#1 楼 @zhangyuan 简化代码如下:
a.each do |line|
line.split(' ').each do |word|
#do something
end
end