heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

Error downgrading Postgresql #1861

Open dfalkner opened 8 years ago

dfalkner commented 8 years ago

When I run this command to downgrade a pg database in my app fcg-reporting-service-staging:

heroku pg:copy postgres://from postgres://to --app fcg-reporting-service-staging --confirm d6mu5hteqrgdmv

I get the following message: ! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       undefined method `resource_name' for nil:NilClass (NoMethodError)
Command:     heroku pg:copy postgres://from postgres://to --app fcg-reporting-service-staging --confirm d6mu5hteqrgdmv
Version:     heroku-toolbelt/3.42.25 (x86_64-darwin10.8.0) ruby/1.9.3
Error ID:    f107363a64d64152b3a8ef31d7501ebd

More information in /Users/danefalkner/.heroku/error.log

And the following error log: 2015/12/18 09:45:46 running heroku-cli/4.27.9-cce0260 (amd64-darwin) go1.5.2 from /Users/danefalkner/.heroku/heroku-cli Heroku client internal error. undefined method resource_name' for nil:NilClass /Users/danefalkner/.heroku/client/lib/heroku/client/heroku_postgresql.rb:39:inresource_name' /Users/danefalkner/.heroku/client/lib/heroku/client/heroku_postgresql.rb:139:in pg_copy' /Users/danefalkner/.heroku/client/lib/heroku/command/pg_backups.rb:48:incopy' /Users/danefalkner/.heroku/client/lib/heroku/command.rb:212:in run' /Users/danefalkner/.heroku/client/lib/heroku/cli.rb:30:instart' /usr/local/bin/heroku:24:in `

'

jdx commented 8 years ago

This is usually because the ruby installation isn't properly compiled. Try reinstalling ruby and/or the toolbelt.

Also you probably shouldn't post your database credentials on the internet like that. I removed them for you. If it's an important database though you should roll the creds.