ONLINE Heroku日志:
Started GET "/" for 180.246.231.210 at Tue Jan 25 08:25:43 -0800 2011
Processing by Store::HomeController#index as HTML
Country Load (7.6ms) SELECT "countries".* FROM "countries" WHERE ("countries"."id" IS NULL) LIMIT 1
Country Load (1.9ms) SELECT "countries".* FROM "countries" LIMIT 1
SQL (2.5ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"zones"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Completed in 15ms
本地生产日志:
Started GET "/" for 127.0.0.1 at 2011-01-26 08:10:21 +0700
Processing by Store::HomeController#index as HTML
LeftSidebarLink Load (0.4ms) SELECT "links".* FROM "links" WHERE ("links"."type" = 'LeftSidebarLink') AND ("links"."target_url" = 'http://localhost:3000/') ORDER BY position LIMIT 1
LeftSidebarLink Load (0.2ms) SELECT "links".* FROM "links" WHERE ("links"."type" = 'LeftSidebarLink') AND ("links"."target_url" IN ('/')) ORDER BY position LIMIT 1
LeftSidebarLink Load (0.1ms) SELECT "links".* FROM "links" WHERE ("links"."type" = 'LeftSidebarLink') AND ("links"."target_url" IN ('')) ORDER BY position LIMIT 1
1
2
3
FeaturedBanner Load (0.3ms) SELECT "featured_banners".* FROM "featured_banners" WHERE (active = '1' OR (date_start >= DATE('2011-01-26') AND DATE('2011-01-26') <= date_end))
Image Load (0.2ms) SELECT "images".* FROM "images" WHERE ("images"."id" = 4) LIMIT 1
FooterLink Load (0.2ms) SELECT "links".* FROM "links" WHERE ("links"."type" = 'FooterLink') AND ("links"."parent_id" IS NULL) ORDER BY position
Rendered store/home/index.html.erb within layouts/store_default (13.0ms)
Completed 200 OK in 175ms (Views: 63.2ms | ActiveRecord: 1.4ms)
注意:输出了1,2,3行logger.debug。
为什么两个完全相同的设置和文件集和数据库显示不同的输出?为什么以某种方式存储/ home / index.html.erb没有加载到我的在线应用程序中?
答案 0 :(得分:0)
只是一个想法:你真的将数据包含在Heroku的数据库中吗? (即种子数据库)