using taps to transfer data to postgreSQL not working

543 Views Asked by At

I have been following Railscasts guide for converting my db from sqlite to postgreSQl.

I have been able to successfully

  • install postgres
  • create and configure the db
  • connect to it using pgAdminIII
  • use rails db create to create the database
  • install taps
  • start the taps server

However when I run the pull command to do the transfer i get the following error message

Failed to connect to database:
  NameError -> uninitialized constant Sequel::Postgres::PGError

For reference here is the command I used to attempt the pull

taps pull postgres://myuser:[email protected]:5432/mydb_dev http://pynn:secret@localhost:5000

I also attempted with localhost instead of 127.0.0.1:5432

Clearly something is wrong with my setup, but I can't figure out what it is is from the error message provided.

2

There are 2 best solutions below

0
ian On BEST ANSWER

Try replacing:

 gem "pg"

in the Gemfile with:

 gem "sequel_pg", :require=>'sequel'

It's a faster version of the PG gem especially for Sequel, so I'd prefer it anyway, and it may help avoid namespace clashes of which this is probably one.

1
qhduong On

Do you have the gems listed in your Gemfile? I believe you need to add gem "pg" in your Gemfile and re-bundle.