Heroku and MySQL

Hi,
Whenever I deploy a Rails app using MySQL I get an application error. I
even tried a hello-world app and I get the error even though everything
was
uploaded fine. It always says to look in my logs but there’s nothing
there. Heroku says it should ‘just work’ with no explanation. Has
anyone
successfully done this and what basic tweaks did you have to make?

Thanks

On Jan 6, 2012, at 3:39 AM, ghilly wrote:

Hi,
Whenever I deploy a Rails app using MySQL I get an application error. I even
tried a hello-world app and I get the error even though everything was uploaded
fine. It always says to look in my logs but there’s nothing there. Heroku says
it should ‘just work’ with no explanation. Has anyone successfully done this and
what basic tweaks did you have to make?

AFAIK Heroku only runs PostgreSQL. I am not aware of any changes to that
policy.

If you run MySQL on a different server (maybe one of the AWS RDB
services or the like) then you just have to set up your database
connection for production to use that host and skip the Heroku database
layer altogether.

Walter

On Fri, Jan 6, 2012 at 5:05 AM, Walter Lee D. [email protected]
wrote:

AFAIK Heroku only runs PostgreSQL. I am not aware of any changes to that policy.

Or… Heroku will convert sqlite3 databases during the push. I
wouldn’t know for sure; but from the OP I’d guess they don’t do the
same for MySQL

Greg A.
http://twitter.com/akinsgre

On Jan 6, 2012, at 9:07 AM, Greg A. wrote:

On Fri, Jan 6, 2012 at 5:05 AM, Walter Lee D. [email protected] wrote:

AFAIK Heroku only runs PostgreSQL. I am not aware of any changes to that
policy.

Or… Heroku will convert sqlite3 databases during the push.

Really? I thought they just ran the migrations against a new PostgreSQL
database and that was that. I’ve never seen data migrate during a push
to Heroku – have you?

Walter

I wouldn’t know for sure; but from the OP I’d guess they don’t do the
same for MySQL

On Fri, Jan 6, 2012 at 6:26 AM, Walter Lee D. [email protected]
wrote:

Or… Heroku will convert sqlite3 databases during the push.

Really? I thought they just ran the migrations against a new PostgreSQL database
and that was that. I’ve never seen data migrate during a push to Heroku – have
you?

Hey! Don’t try to confuse me with logic and facts :slight_smile:

You’re right and I was confused. The Sqlite conversion is during a
heroku db:pull Not during a mgiration.

Sorry… still haven’t had my 10th cup of coffee.


Greg A.
http://twitter.com/akinsgre

On Fri, Jan 6, 2012 at 12:39 AM, ghilly [email protected] wrote:

Whenever I deploy a Rails app using MySQL I get an application error. I
even tried a hello-world app and I get the error even though everything was
uploaded fine. It always says to look in my logs but there’s nothing there.
Heroku says it should ‘just work’ with no explanation. Has anyone
successfully done this and what basic tweaks did you have to make?

Yes, many times, and as long as you have everything the app needs
properly specified in your Gemfile and no proprietary DB statements
in your code, it should “just work”.

Can you paste the log from a test deployment?


Hassan S. ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

On Fri, Jan 6, 2012 at 10:23 PM, ghilly [email protected] wrote:

Ok, I misunderstood - I thought you could keep your mysql gem. I migrated
to Postgres and made a few controller tweaks and it worked.

Just to be clear, for anyone else finding this thread – you don’t
have
to “migrate to Postgres” locally to use Heroku. You can use any DB on
your dev machine, including MySQL, it doesn’t matter. You don’t need
to do anything about the ‘mysql’ reference in your Gemfile.

When you push your app to Heroku, it will be running on PostgreSQL
there, but unless you have DB-specific code in your app, it will be
fine.


Hassan S. ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

Ok, I misunderstood - I thought you could keep your mysql gem. I
migrated
to Postgres and made a few controller tweaks and it worked. Thanks for
your help.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs