Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 运行旧版本种子文件的Heroku_Ruby On Rails_Heroku_Seed - Fatal编程技术网

Ruby on rails 运行旧版本种子文件的Heroku

Ruby on rails 运行旧版本种子文件的Heroku,ruby-on-rails,heroku,seed,Ruby On Rails,Heroku,Seed,我有一个奇怪的Heroku问题。我用一个新的种子文件成功地推送到Heroku,我看到了变化,这个种子文件只有一个条目。create。旧种子文件中有10000个创建项。播种应该很快。到目前为止,我: 1) 确保我从一个大师推到另一个大师。我从大师那里跑去推希罗库大师 2) 我确保git添加和git提交 3) 当我运行heroku运行rake db:seed时,它仍然像这个100000行种子文件一样运行。有什么想法吗?在更新种子文件之前,您是否在heroku中重置了数据库?如果没有,就跑 $ her

我有一个奇怪的Heroku问题。我用一个新的种子文件成功地推送到Heroku,我看到了变化,这个种子文件只有一个条目。create。旧种子文件中有10000个创建项。播种应该很快。到目前为止,我:

1) 确保我从一个大师推到另一个大师。我从大师那里跑去推希罗库大师

2) 我确保git添加和git提交


3) 当我运行heroku运行rake db:seed时,它仍然像这个100000行种子文件一样运行。有什么想法吗?

在更新种子文件之前,您是否在heroku中重置了数据库?如果没有,就跑

$ heroku pg:reset DATABASE
$ heroku run rake db:migrate
$ heroku run rake db:seed
这将首先从生产数据库中删除上一个种子