Heroku没有从Rails应用程序接收种子数据

时间:2017-11-02 05:49:07

标签: ruby-on-rails ruby ruby-on-rails-3 heroku

我向Heroku部署了一个Rails应用程序,数据库迁移得很好,除了db / seeds.rb文件不会推送到Heroku。我已经尝试运行heroku run rake db:seed,以及在线建议的所有其他解决方案,但没有任何工作。 Heroku似乎根本无法访问seeds.rb文件。

运行heroku运行db:seed后,似乎没有任何值得发生的事情:

Running rake db:seed on ⬢ top5application... up, run.1885 (Free)
D, [2017-11-02T05:42:19.665233 #4] DEBUG -- :   
ActiveRecord::SchemaMigration Load (1.3ms)  SELECT 
"schema_migrations".* FROM "schema_migrations"

Heroku日志似乎也没有任何有用的信息:

1d22032e7d7e fwd="69.201.160.131" dyno=web.1 connect=0ms service=17ms status=200 bytes=4542 protocol=https
2017-11-02T05:13:34.409329+00:00 app[web.1]: I, [2017-11-02T05:13:34.409232 #4]  INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Started GET "/lists" for 69.201.160.131 at 2017-11-02 05:13:34 +0000
2017-11-02T05:13:34.410736+00:00 app[web.1]: I, [2017-11-02T05:13:34.410667 #4]  INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Processing by ListsController#index as HTML
2017-11-02T05:13:34.413696+00:00 app[web.1]: D, [2017-11-02T05:13:34.413601 #4] DEBUG -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e]   [1m[36mList Load (0.9ms)[0m  [1m[34mSELECT "lists".* FROM "lists" ORDER BY average_rating DESC[0m
2017-11-02T05:13:34.415282+00:00 app[web.1]: I, [2017-11-02T05:13:34.415205 #4]  INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e]   Rendering lists/index.html.erb within layouts/application
2017-11-02T05:13:34.417088+00:00 app[web.1]: D, [2017-11-02T05:13:34.416900 #4] DEBUG -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e]   [1m[36mList Load (0.8ms)[0m  [1m[34mSELECT "lists".* FROM "lists" ORDER BY "lists"."created_at" DESC[0m
2017-11-02T05:13:34.418866+00:00 app[web.1]: D, [2017-11-02T05:13:34.418785 #4] DEBUG -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e]   [1m[36mTopic Load (0.7ms)[0m  [1m[34mSELECT "topics".* FROM "topics"[0m
2017-11-02T05:13:34.419839+00:00 app[web.1]: I, [2017-11-02T05:13:34.419757 #4]  INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e]   Rendered lists/index.html.erb within layouts/application (4.3ms)
2017-11-02T05:13:34.422316+00:00 app[web.1]: D, [2017-11-02T05:13:34.422246 #4] DEBUG -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e]   [1m[36mUser Load (0.9ms)[0m  [1m[34mSELECT  "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
2017-11-02T05:13:34.423714+00:00 app[web.1]: I, [2017-11-02T05:13:34.423652 #4]  INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e]   Rendered layouts/_logged_in.erb (0.8ms)
2017-11-02T05:13:34.423973+00:00 app[web.1]: I, [2017-11-02T05:13:34.423915 #4]  INFO -- : [44ea0b33-64d7-4516-90d1-1d22032e7d7e] Completed 200 OK in 13ms (Views: 7.0ms | ActiveRecord: 3.3ms)

我真的很感激任何见解,因为这非常令人困惑。

0 个答案:

没有答案