This error is a result of the gem having a different adapter name -
you have to edit your database.yml file as 'adapter: mysql2'.

On heroku, of course, you can't do that directly; the appropriate way
to change the adapter is to change the rds DATABASE_URL string from
'mysql://.....' to 'mysql2://.......'.

But the heroku RDS addon page considers that an invalid url (for now.
They'll probably fix it soon), so you can't submit the form.
You can get around that by using the heroku gem on the command line:

$ heroku config:add DATABASE_URL=mysql2://...


On Dec 20, 6:07 pm, Chris Conley <[email protected]> wrote:
> I came across this error as well. For the time being, I've reverted to
> the 'mysql' gem.
>
> -Chris
>
> On Dec 15, 6:08 pm, vovayartsev <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi all.
>
> > There seem to be a bug in Amazon RDS addon (or I'm doing something
> > wrong?).
> > Here are the steps to reproduce:
>
> > 1. Create an empty rails-3.0.3 app with a single scaffolded resource.
> > 2. Add the "gem 'mysql2'" line to Gemfile; then execute `bundle
> > install`. Make sure the command 'bundle show mysql2' can find the gem.
> > 3. Push the app to Heroku (using the default bamboo-ree-1.8.7 stack).
> > 4. Make sure the 'db:migrate" task and the application itself run as
> > expected using the shared 5MB database.
> > 5. Launch an Amazon RDS instance in us-east-1a zone, then follow 
> > thehttp://docs.heroku.com/amazon_rdsguidelines:
> > 5.1 rds-authorize-db-security-group-ingress .......    # ok
> > 5.2 heroku db:pull mysql://user:[email protected]/databasename
> > # ok
> > 5.3 heroku addons:add amazon_rds url=mysql://
> > user:[email protected]/databasename    # ok
> > 5.4 heroku rake db:migrate      # this FAILS !!!!
>
> > The last step fails with the following error:
> >        !!! Missing the mysql2 gem. Add it to your Gemfile: gem
> > 'mysql2'
>
> > Note: I used the same url in 5.2 and 5.3 steps (I copy-pasted it to
> > avoid spelling errors).
>
> > HERE'S WHAT I'd LIKE TO KNOW
>
> > 1. Is this a know issue? Does anyone knows a workaround?
> > 2. If anyone was able to reproduce the issue?
> > 3. Are there Heroku techs reading this group? Or should I better post
> > a ticket tohttp://support.heroku.com/?

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to