LoginSignup
1
1

More than 5 years have passed since last update.

heroku db:push時に404エラーが起こった時の対処法

Posted at

参考:http://stackoverflow.com/questions/12591322/404-error-on-heroku-dbpush

Taps gemから直接DATABASE_URLで参照しているEC2インスタンスのDBに向けてデータを転送する。

Connection Settingの値からEC2インスタンスのURLを作成する

1)HerokuのPostgresダッシュボードから使用しているDBを選択する。
https://postgres.heroku.com/

2)Connection SettingsのHost、Databse、User、Port、Passwordから以下のようなURLを作成する。(以降このURLを[EC2_URL]と呼ぶ)

[EC2_URL]
postgres://[User]:[Password]@[Host]:[Port]/[Database]

Tapsでデータを転送する

1)Tapsサーバを立ち上げて、ローカルのDBの情報をURLで参照できるようにする。

taps server sqlite://db/development.sqlite3 user password

2)作成した[EC2_URL]に向けてデータを転送する

taps pull [EC2_URL] http://user:password@localhost:5000

力技ですが、これでデータを転送することができます。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1