heroku db:pull postgresql://root:@localhost/db_name
After this command display this message
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:50: warning: parenthesize argument(s) for future version Loaded Taps v0.3.13 Warning: Data in the database 'postgresql://root:@localhost/db_name' will be overwritten and will not be recoverable. Are you sure you wish to continue? (y/n)? y Failed to connect to database: Sequel::AdapterNotFound -> LoadError: no such file to load -- sequel/adapters/postgresql
How to use db:pull
All Heroku Postgres databases have a corresponding Heroku application. You can find the application name on the database page at data.heroku.com. Your database is attached to the Heroku app and is accessible via an app config var containing the database URL, even if you host no code in the application itself.
You can find them by visiting the Resources tab on your Dashboard then clicking on the DB you use. It will take you to the Addons page in another tab. Click on the Settings tab then View Credentials. Using these credentials, you can use Adminer to login to the DB.
First, you need to fix your connection string: use postgres
instead of postgresql
.
You will need to have the pg
db adapter installed to use Sequel's postgresql adapter:
gem install pg
You may also want to make sure your taps, sequel, and heroku gems are up to date:
gem install heroku taps sequel
Then try your heroku db:pull
again. If that doesn't work, post a comment or hop in #heroku on Freenode and we can try to help.
Your connection string is wrong. Try:
heroku db:pull postgres://root:@localhost/db_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With