ruby-on-rails - 在Heroku Cedar堆栈上运行rake db:drop db:create db:migrate

标签 ruby-on-rails heroku rake cedar

当我尝试运行时:

heroku run rake db:drop db:create db:migrate

我得到错误:
Running rake db:drop attached to terminal... up, run.5
Couldn't drop adsfsadfas : #<ActiveRecord::StatementInvalid: PGError: ERROR:  must be owner of database adsfsadfas
: DROP DATABASE IF EXISTS "adsfsadfas">

我在Heroku Cedar堆栈上。我可以在Heroku上删除数据库吗?

谢谢!

约翰

最佳答案

The rake db:reset task is not supported. Heroku apps do not have permission to drop and create databases. Use the heroku pg:reset command instead.

关于ruby-on-rails - 在Heroku Cedar堆栈上运行rake db:drop db:create db:migrate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8162420/

相关文章:

ruby-on-rails - 在 rake 任务期间关闭观察者的简单方法?

ruby-on-rails - 这是错误处理反模式吗?

ruby-on-rails - 强化遗留 Rails 应用程序的第一步是什么?

javascript - Heroku 配置变量在 Node.js 中无法访问?

ruby-on-rails - Capistrano 3 部署 :migrate not executing due to missing primary

ruby - 如何将命令行参数传递给 rake 任务

ruby - rake 中止 : could not find rspec

ruby-on-rails - Rails 缓存权限错误

ruby-on-rails - NameError:Heroku 日志中未初始化的常量 CarrierWave::Storage::Fog

django - 如何在Heroku上运行Django测试