I've been using ClearDB on Heroku with great success. Not only is it MySQL (so 
you avoid all those stupid PostgreSQL/MySQL differences -- and there ARE 
differences), but it co-locates your database in two Amazon regions. 

Highly recommended.

As for your question, you need to run either heroku run rake db:migrate or 
heroku db:push to set up your database

-Jason


On May 15, 2012, at 9:49 AM, Frederick Cheung wrote:

> 
> 
> On May 15, 12:06 pm, "Miguel A." <li...@ruby-forum.com> wrote:
>> Im using Rails 3.2.3 and Ruby 1.9.3.
>> I want to deploy my app to heroku but am having some issues.
>> 
>> Basically I can push it to heroku but no tables are created, at least
>> all data is empty.
>> 
>> I can't login as it says "Invalid username/password" and my item list in
>> my index is completely empty, when in development it isn't.
>> 
>> Im using MySQL2 in developemnt and PG in Production as that is what
>> heroku uses.
>> I've looked at tutorials and troubleshooting tips and came up with the
>> following:
>> 
>> I've added this line in my /config/environment/production.rb
>>   config.assets.initialize_on_precompile = false
>> 
>> I've ran: git push heroku master
>> 
>> and heroku run rake db:migrate
>> 
>> I've also checked the DB versions and both are the same, on heroku, and
>> locally.
>> 
>> Finally, in my gemfile i've added:
>> 
>> group :development, :test do
>>   gem 'mysql2'
>> end
>> group :production do
>>   gem 'pg'
>> end
>> 
>> Any tips? I don't see how to resolve this, thanks in advance
>> 
> Pushing to heroku isn't going to import data from your development
> machine into your production database if that's what you're expecting.
> If you need to populate your database with a minimal set of bootstrap
> data you might consider writing some code that creates that initial
> data (you may find rails' db/seeds mechanism to be sufficient).
> 
> If you're ok with production containing everything that's in your
> local database you can either use heroku's db:push (https://
> devcenter.heroku.com/articles/taps) command or one of the mysql to
> postgres conversion tools heroku recommends(https://
> devcenter.heroku.com/articles/import-data-heroku-postgres)
> 
> I would heartily recommend using the same database in development as
> in production - the differences between databases can be subtle.
> 
> Fred
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to