1

I am very new to heroku/ruby on rails and git. I just went through Michael Hartl's Ruby on Rails tutorial and want to push my local database to heroku but am having trouble.

After doing some research I found this article:

pg transfer is the new taps

It seems like it should work, but I do not understand how to set my env var DATABASE_URL:

$ env DATABASE_URL=postgres://localhost/someapp-dev heroku pg:transfer

Specifically I have no idea what I am supposed to directly copy and what to change. I believe I need to enter my own local host and my own database name.

Is this correct? If so how do I find my localhost and how do I find my database name?

My database.yml file looks like this:

development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000
Nobita
  • 23,519
  • 11
  • 58
  • 87
dstung
  • 97
  • 2
  • 11
  • Let's start from the beginning. What are you exactly trying to do? – Nobita Aug 18 '14 at 01:16
  • Are you trying to copy production db to your app running locally? – neo Aug 18 '14 at 01:20
  • I'm trying to copy my local database (wherever that is, I'm not sure where it is) to heroku. I basically saved some user names/passwords locally that I want to work on heroku. – dstung Aug 18 '14 at 02:28

1 Answers1

0

my understanding - you must use a Postgresql database on Heroku. When I pushed an application to Heroku I changed the databases to Postgresq al part of the push - including in Dev. Looking at the link you provided I get the impression it means the database you are copying from is also Postgresql (as opposed to SQLite).

user1854802
  • 388
  • 3
  • 14
  • This link is to a stackoverflow question whichshould help-converting SQLite to Postgresql - http://stackoverflow.com/questions/4581727/convert-sqlite-sql-dump-file-to-postgresql - Pierre – user1854802 Aug 18 '14 at 00:38