views:

57

answers:

2

So for a class I have to turn in my Rails application to my professor. What is the best way to make sure everything goes smoothly when he trys to start it up? Also, is there anyway I can freeze a database and send that with it so he has all of the data I have been using in the application?

Thanks a lot.

A: 

My guess is you have hard coded connection strings in your rails application. Ask your professor what server he will be running it off of. At that point either change the strings to match or create a config file that is read in and can be edited (which is the better choice of the two). Most databases have export functionality which will allow you to export the current information within the database.

Woot4Moo
+6  A: 

Depending on your needs, the SQLite3 database (used by default in Rails) is stored on the file system in the db directory of your Rails app. So, assuming your professor has the requirements to run Ruby on Rails, the application will start up with the data you've used.

Mark Morga
http://www.erikveen.dds.nl/distributingrubyapplications/rails.html is a good tutorial on packing up a rails app for distribution.
BaroqueBobcat
Thank you. Duh, I knew the database file was in there. Should have known I could package that up with it. Thanks again!
jluebbert