Wednesday, January 23, 2008

I got an account with Heroku to host the rails app that I'm working on (a coupon tracker), and it is awesome! I have been developing on my local, then uploading the files to their site when I have my specs passing and my brief manual tests pass.

There was on gotcha, though. I recently added user authentication, which meant I had a bunch of files in different directories that needed to be uploaded. I could have re-imported my whole application, but that flushes your database, as it treats it like the initial setting up of the application. This sucks, as I'm using the app to actually track my real savings with the Entertainment Book.

I contacted their support about this. My suggestion was to allow me to upload a tarball into a root somewhere and have it expand it with overwrite. I got a reply back from James Lindenbaum there pretty promptly. He agreed that importing the application wouldn't work exactly for me, but he suggested the following:

- in the rake window, run "db:data:dump", this will create a db/data.yml file with your data in it
- download db/data.yml
- import your new code
- upload data.yml to db/
- in the rake window, run "db:data:load"

Well, I just did it, and it worked great! This is also a great way to just do a simple refresh, in case I've missed some stuff.

So, all-in-all, I'm very happy with Heroku, especially with their support.

Wednesday, January 23, 2008 10:06:10 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
Comments are closed.