简体   繁体   English

上载更改和数据库时,Heroku pg错误:(Sequel :: DatabaseError)

[英]heroku pg error when uploading changes and database: (Sequel::DatabaseError)

I made some changes in my local development version of my app. 我在我的应用程序的本地开发版本中进行了一些更改。

Then I uploaded everything using git the usual thing. 然后,我使用git正常上传所有内容。

To push my changes to the database I used: 要将更改推送到我使用的数据库:

heroku db:push

I get this error on my terminal: 我在终端上收到此错误:

Sending schema
/Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `async_exec': PG::Error: ERROR:  permission denied for relation temp_listings (Sequel::DatabaseError)
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `block (2 levels) in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/database/logging.rb:28:in `log_yield'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `block in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:158:in `check_disconnect_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:240:in `block (2 levels) in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:226:in `synchronize'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:240:in `block in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:261:in `check_database_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:238:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:541:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:319:in `fetch_rows'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:123:in `each'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:449:in `single_record'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:457:in `single_value'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:202:in `get'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:96:in `count'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:570:in `block in fetch_local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:569:in `each'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:569:in `fetch_local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:551:in `local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:556:in `tables'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:439:in `push_schema'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:407:in `block in run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:203:in `call'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:203:in `catch_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:405:in `run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/cli.rb:172:in `clientxfer'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command/db.rb:194:in `taps_client'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command/db.rb:35:in `push'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command.rb:148:in `run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/cli.rb:9:in `start'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/bin/heroku:16:in `<top (required)>'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `load'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `<main>'

Any idea how to fix this or what Im doing wrong? 任何想法如何解决这个问题或我做错了什么?

I already tried running the following: 我已经尝试运行以下命令:

heroku pg:reset 

then tried again heroku db:push that didnt work so I tried this 然后再次尝试了heroku db:push没用,所以我尝试了这个

heroku run rake db:migrate

that didnt work either 那也不起作用

so I created a new instance of my app and pushed it. 因此我创建了我的应用的新实例并将其推送。 Getting the same error 得到同样的错误

While convenient, using taps (what db:push/pull uses) may not replicate your data exactly and may run into errors for larger transfers. 虽然方便,但使用水龙头(db:push / pull的用途)可能无法完全复制您的数据,并且对于较大的传输可能会出错。 To import or export data from your production system, we highly recommend using pgbackups instead. 要从生产系统导入或导出数据,我们强烈建议改用pgbackups。 http://devcenter.heroku.com/articles/pgbackups http://devcenter.heroku.com/articles/pgbackups

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM