6
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

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
ritesh
  • 61
  • 1
  • 2

3 Answers3

12

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.

wuputah
  • 11,285
  • 1
  • 43
  • 60
2

Your connection string is wrong. Try:

heroku db:pull postgres://root:@localhost/db_name
Jeremy Evans
  • 11,959
  • 27
  • 26
  • Jeremy is right, totally missed that you used 'postgresql' instead of 'postgres'. – wuputah Oct 18 '10 at 07:06
  • I had to use a connection URL in the command like this: `heroku db:pull postgres://@localhost/my_local_db` -- in other words I didn't have a user named root. – Purplejacket Dec 21 '11 at 18:50
0

Started working fine once I upgraded the "pg" gem from version "0.11.0" to "0.12.2".

karthik c
  • 220
  • 2
  • 11