3

I have a problem running the heroku db:pull and db:push commands. My app is running Rails 3 on the bamboo-ree-1.8.7 stack. I am new to Sequel and am not sure what the script is complaining about.

$heroku db:push
Loaded Taps v0.3.14
Auto-detected local database: postgres://xxx@127.0.0.1/xxx_development?encoding=utf8
Warning: Data in the app 'profreelas' will be overwritten and will not be recoverable.
Failed to connect to database: NameError -> uninitialized constant Sequel::Postgres::PGError

Additional info:
My taps, sequel, and heroku gems are up to date
I am running the pg db adapter gem
Running postgresql in my local machine

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
sergiomb
  • 51
  • 1
  • 3
  • 1
    This isn't a programming question, it's a tech support question for Heroku. You might have better luck looking in the Heroku support forums or on the superuser site. Sorry. –  Jan 04 '11 at 02:02
  • or you can open a support ticket at heroku ... – wizztjh Jan 04 '11 at 05:10
  • 2
    I don't know why this question had been closed..? In case anyone else runs into this, I also did. I was trying to use the pg gem for my apps but kept running into this when trying to pull from heroku. I managed to fix the problem by uninstalling the activerecord-jdbcpostgresql-adapter and activerecord-jdbc-adapter gems from my local machine. – 2potatocakes Feb 22 '11 at 09:31
  • 3
    fwiw i don't see any problem with putting heroku related questions on StackOverflow. – Max Williams Oct 30 '11 at 15:19
  • 1
    i don't even use heroku and i found this question useful – Pynner Feb 17 '13 at 04:09

1 Answers1

5

Do you have a pg.rb or postgres.rb file somewhere in your ruby path? Because that could cause the error, as requiring pg or postgres will load your file instead of the pg or postgres library.

Jeremy Evans
  • 11,959
  • 27
  • 26
  • I didn't find any pg/psotgres.rb in the path. I opened a ticket in heroku. Thanks! – sergiomb Jan 07 '11 at 16:08
  • 4
    This answer saved me after 3 days of pain. The activerecord-jdbc-adapter gem contains a pg.rb file that causes this problem, uninstalling it fixes it. To anyone with this issue I recommend doing a file search on your Ruby directory (and sub-directories) for pg.rb. And Mr Evans, I owe you a beer or other beverage of equal value. – kinofrost Apr 04 '11 at 09:25
  • 2
    gem uninstall activerecord-jdbc-adapter worked great! – Ashley Raiteri Aug 14 '12 at 23:56