Posts

Showing posts from January, 2018

Import database direct from heroku into ruby on rails applpication

heroku pg:backups:capture --app yourappname Hit Ctrl-C at any time to stop watching progress; the backup will continue running. Stop a running backup with heroku pg:backups:cancel. HEROKU_POSTGRESQL_BLACK (DATABASE_URL) ----backup---> b251 Running... done heroku pg:backups:restore b251 DATABASE_URL --app yourappname

Clear cache on heroku

heroku run --app YOUR_APP_NAME rails runner Rails.cache.clear If the above does not work, try running: heroku run rake tmp:create heroku run rake tmp:clear

Convert databases from SQLite to PostgreSQL

gem install sequel sequel - C sqlite : //db/development.sqlite3 postgres://user:password@localhost/dbname