0

Please install the postgresql adapter: gem install activerecord-postgresql-adapter (pg is not part of the bundle. Add it to Gemfile.)

So I followed the instructions here: How to handle Ruby on Rails error: "Please install the postgresql adapter: `gem install activerecord-postgresql-adapter'"

First of all, that doesn't fix my issue (causes other errors that I'd need to debug), but regardless, why should I have to install the PG interface for ruby exactly? I'm on mysql!

Edit: I've been told Heroku doesn't support MySQL. Was this a recent change? I was using mysql just about 3 months back for my Heroku site without any issues at all.

Community
  • 1
  • 1
Ringo Blancke
  • 2,444
  • 6
  • 30
  • 54
  • 3
    Heroku doesn't support MySQL. Or are you using some addon? – jer Jan 05 '12 at 00:16
  • is this recent? I thought they definitely used to support mysql ... in fact, I launched a site 3 months ago that had a mysql DB! – Ringo Blancke Jan 05 '12 at 00:18
  • I've been using Heroku for several years, they've never natively supported MySQL. Your app may have had a MySQL DB locally, but PostgreSQL on Heroku. Heroku automatically generates a database.yml for you when you upload a rails app for instance. – jer Jan 05 '12 at 00:22
  • I don't think they ever supported it. However, I believe they override your `database.yml` file anyway, so even if you specified MySQL on your older site, they were still using PostgreSQL on their end. – Dylan Markow Jan 05 '12 at 00:24
  • yup Heroku does not support mysql @jer should get this as an answer ;) – Thong Kuah Jan 05 '12 at 02:06

1 Answers1

1

I don't want to presume anything but if you were able to work with heroku before, you probably had something like this in your Gemfile:

group :production do
  gem 'pg'
....
end

group :development do
  gem 'rspec-rails'
  gem 'sqlite3'

....
end

This would ensure that rails is using mysql (or sqlite3 if you copy the example verbatim) in the development environment and postgres ('pg') on the production environment hosted by heroku. Give this a shot and see if it solves your problem. I hope it does.

Community
  • 1
  • 1
Tabrez
  • 3,424
  • 3
  • 27
  • 33
  • Just would like to point out that sqlite3 is **not** the same as mysql. I'm not trying to be pedantic, I say it because there are very important differences that can cause problems when you migrate from one to the other. – kakubei Dec 20 '12 at 15:36