Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I am using Open Streetmap Data in my rails app. I have downloaded the relevant data as a .osm and can import that data into my db using osm2pgsql. So far no problem.

But how can i arrange the data to be imported automatically when I create the database? For example when I move the app to a production server, or when I just want to reset the database via db:drop.

Any help is appreciated. Cheers, Martin

share|improve this question
up vote 0 down vote accepted

You can add it to your db/seeds.rb file.

Check this Railscast for an insight. You probably will need to invoke the osm2pgsql from the command line.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.