You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a rails app and before I do a migration I do a manual backup just incase I have to rollback. I can't use run because it needs to execute locally, but sh_heroku fails:
heroku-toolbelt/2.39.2 (x86_64-darwin10.8.0) ruby/1.9.3
help pgbackups --app waterfalldev
!`help pgbackups` is not a heroku command.
! See `heroku help`for a list of available commands.
rake aborted!
Command failed with status (1): [heroku help pgbackups --app waterfalldev]
The current sh_heroku can't deal with executing local commands. I think it has to do with how system 'command args' is processed differently then system 'command', args.
There has to be a better then this, but here is what I came up with.
classHerokuSan::Stagepublic:sh_herokudefsh_heroku_local(*command)@debug=truepreflight_check_for_clicmd=(['heroku'] + command + ['--app',app]).compactshow_command=cmd.join(' ')
$stderr.putsshow_commandif@debugok=systemshow_commandstatus= $?
okorfail"Command failed with status (#{status.exitstatus}): [heroku #{show_command}]"endend
Results of using sh_heroku_local
heroku-toolbelt/2.39.2 (x86_64-darwin10.8.0) ruby/1.9.3
heroku help pgbackups --app waterfalldev
Usage: heroku pgbackups
list captured backups
Additional commands, type"heroku help COMMAND"for more details:
pgbackups:capture [DATABASE] # capture a backup from a database id
pgbackups:destroy BACKUP_ID # destroys a backup
pgbackups:restore [<DATABASE> [BACKUP_ID|BACKUP_URL]] # restore a backup to a database
pgbackups:url [BACKUP_ID] # get a temporary URL for a backup
The text was updated successfully, but these errors were encountered:
Notice you need to pass the command args as separate arguments to the method rather than encoding the command and args in a single string. I'd still love a more out of the box solution for this though :)
I have a rails app and before I do a migration I do a manual backup just incase I have to rollback. I can't use
run
because it needs to execute locally, butsh_heroku
fails:The current
sh_heroku
can't deal with executing local commands. I think it has to do with howsystem 'command args'
is processed differently thensystem 'command', args
.There has to be a better then this, but here is what I came up with.
Results of using sh_heroku_local
The text was updated successfully, but these errors were encountered: